Rename --live to --startup.

master
Mike Hiretsky 13 years ago
parent 728c5785de
commit 98f16a4117

@ -91,7 +91,7 @@ configure_users() {
start() {
install_video_driver
LANG=C /usr/bin/cl-install --live
LANG=C /usr/bin/cl-install --startup
LANG=C create_nonroot_user
LANG=C configure_users

@ -5,7 +5,7 @@ cl-install - Установка Calculate Linux на жесткий диск, US
.SH СИНТАКСИС
[-d] [-w] [--mbr] [--type] [--iso] [-s] [--march] [--build] [-l] [-u] [--hostname]
[--netconf] [--dhcp] [--ip] [--route] [--dns] [--proxy] [--ntp] [--nouuid] [--set] [-U] [-f]
[--live] [--install] [--uninstall] [--nospinner]
[--startup] [--install] [--uninstall] [--nospinner]
[-P] [-p] [-v] [--filter] [--xml] [--color] [--version] [-h]
.SH ОПИСАНИЕ
.PP
@ -130,7 +130,7 @@ IPv4 адрес сети с указанием CIDR. IFACE может обозн
Не задавать вопросы в процессе установки системы.
.RE
.PP
\fB\-\-live\fR
\fB\-\-startup\fR
.RS 4
Выполнить настройку текущей системы. При выполнении команды производится настройка системы шаблонами, утилиты Calculate подключаются к автоконфигурированию устанавливаемых пакетным менеджером програм. Команда выполняется при загрузке с livecd и при первом запуске системы. При помощи нее можно восставновить первичные настройки системы. Совместно с опциями настройки языка, сети, видео и т.п. можно изменить настройки системы.
.RE
@ -201,7 +201,7 @@ cl-install -d /dev/sda2
.PP
Смена видеодрайвера на 'fglrx'. Перед выполнением убедитесь, что у вас установлен пакет 'x11-drivers/ati-drivers'.
.nf
cl-install --live --set os_install_x11_video_drv=fglrx
cl-install --startup --set os_install_x11_video_drv=fglrx
.fi
.PP
Установка системы на несколько разделов. В примере система будет установлена на раздел sda2, все настройки, в том числе данные пользователя будут вынесены в раздел sda5. Раздел sda1 будет использован в качестве 'swap'.

@ -1099,7 +1099,7 @@ class cl_install(color_print, SignalInterrupt):
self.clTempl.closeFiles()
self.clTempl = None
def applyTemplatesLive(self):
def applyTemplatesStartup(self):
"""Apply templates for root of system."""
#self.clVars.Set("cl_root_path","/", True)
self.clVars.Set("cl_chroot_path","/", True)
@ -2230,7 +2230,7 @@ class cl_install(color_print, SignalInterrupt):
# install this package
self.installPackage()
self.printMessageForTest(configureMessage)
self.printByResult(self.applyTemplatesLive())
self.printByResult(self.applyTemplatesStartup())
linuxShortname = self.clVars.Get('os_install_linux_shortname')
# install desktop package

@ -135,7 +135,7 @@ CMD_OPTIONS = [{'shortOption':"d",
'longOption':"force",
'help':_("no questions during the install process")
},
{'longOption':"live",
{'longOption':"startup",
'help':_("configure current system")
},
{'longOption':"install",
@ -173,8 +173,8 @@ class install_cmd(share_cmd):
opt.color_control,
check_values=self.checkOpts)
self.logicObj = cl_install()
# names incompatible options with --live
self.optionsLiveIncompatible = ["type","d", "b", "mbr",
# names incompatible options with --startup
self.optionsStartupIncompatible = ["type","d", "b", "mbr",
"w", "f","U", "s","install","uninstall","build","u"]
self.optionsDhcpIncompatible = ["ip","gateway","dns"]
@ -191,13 +191,13 @@ class install_cmd(share_cmd):
return ", ".join(map(lambda x: len(x) == 1 and "'-%s'"%x or "'--%s'"%x,
listOpt))
def checkIncompatibleLive(self):
"""Check incompatible options for option --live"""
def checkIncompatibleStartup(self):
"""Check incompatible options for option --startup"""
incompatible = list(set(self._getNamesAllSetOptions()) &
set(self.optionsLiveIncompatible))
set(self.optionsStartupIncompatible))
if incompatible:
self.optobj.error(_("incompatible options")+":"+" %s"\
%self.getStringIncompatibleOptions(incompatible+["live"]))
%self.getStringIncompatibleOptions(incompatible+["startup"]))
def checkIncompatibleDhcp(self):
"""Check incompatible options for option --dchp"""
@ -220,8 +220,8 @@ class install_cmd(share_cmd):
self.optobj.error(_("unrecognized option") + ": %s"% "".join(args))
if values.install or values.uninstall:
self.checkIncompatibleInstallUninstall()
if values.live:
self.checkIncompatibleLive()
if values.startup:
self.checkIncompatibleStartup()
if values.dhcp:
self.checkIncompatibleDhcp()
if not values.v:
@ -255,7 +255,7 @@ class install_cmd(share_cmd):
"(example: '{example}'").format(
route=route,
example="default:192.168.1.1"))
if not (values.install or values.uninstall or values.live):
if not (values.install or values.uninstall or values.startup):
if values.v is False and \
not values.p and \
values.d is None and \
@ -353,10 +353,10 @@ class install_cmd(share_cmd):
return False
return True
def setAction(self,live):
def setAction(self,startup):
"""Set action by configuration or install system"""
self.logicObj.clVars.Set('cl_action',
"merge" if live else "system",True)
"merge" if startup else "system",True)
def checkAndSetInstallOptions(self,diskOptions, swapOptions,
usersOptions):

@ -50,8 +50,8 @@ if __name__ == "__main__":
if not install.setVars(options):
sys.exit(1)
# check and set installed options
install.setAction(options.live)
if not (options.live or options.install or options.uninstall):
install.setAction(options.startup)
if not (options.startup or options.install or options.uninstall):
if not install.checkAndSetInstallOptions(options.d,options.w,
options.u):
sys.exit(1)
@ -66,7 +66,7 @@ if __name__ == "__main__":
if not install.isRoot():
sys.exit(1)
# configurate current system
if options.live:
if options.startup:
if not install.configureSystem():
sys.exit(1)
elif options.install:

Loading…
Cancel
Save