Change name of action variable. Action names merge and system.

master3.3
Mike Hiretsky 14 years ago
parent 8cb4aa33bf
commit ff55cf5266

@ -32,7 +32,7 @@ class fillVars(object, glob_attr):
"/lib", "/lib32", "/lib64",
"/opt", "/proc", "/sbin",
"/sys", "/usr", "/var"]
def get_os_net_interfaces_info(self):
"""Информация о существующих сетевых интерфейсах"""
netInterfaces=self.Get("os_net_interfaces")
@ -439,8 +439,11 @@ class fillVars(object, glob_attr):
def get_os_install_kernel_attr(self):
"""Kernel attributes"""
# TODO: on usb-hdd install must be "delay=5"
return ""
# on usb-hdd install must be "delay=5"
if self.Get('os_install_root_type') == 'usb-hdd':
return "delay=5"
else:
return ""
def get_os_install_kernel_resume(self):
"""install kernel resume parameter"""
@ -456,6 +459,8 @@ class fillVars(object, glob_attr):
def get_cl_image(self):
"""Get image file from distributive repository"""
if self.Get('cl_install_action') != 'system':
return ""
if self.Get('os_root_type') == "livecd":
livedistr = ['/mnt/livecd']
else:

@ -611,7 +611,6 @@ class cl_install(color_print):
"""Apply templates for root of system."""
#self.clVars.Set("cl_root_path","/", True)
self.clVars.Set("cl_chroot_path","/", True)
self.clVars.Set("cl_pass_action", "template", True)
self.clTempl = template(self.clVars)
dirsFiles = self.clTempl.applyTemplates()
if self.clTempl.getError():
@ -624,9 +623,9 @@ class cl_install(color_print):
self.printSUCCESS(_("Installation") + " Calculate Linux")
self.defaultPrint("%s\n"%_("System information"))
self.printSUCCESS(_("Computer name")+": %s"%
self.clVars.Get('os_net_hostname'))
self.clVars.Get('os_install_net_hostname'))
self.printSUCCESS(_("Domain name")+": %s"%
self.clVars.Get('os_net_domain'))
self.clVars.Get('os_install_net_domain'))
self.printSUCCESS(_("Network devices")+": %s"%
self.clVars.Get("os_net_interfaces_info"))
self.printSUCCESS(_("Installed system")+": %s %s"%
@ -634,7 +633,7 @@ class cl_install(color_print):
self.clVars.Get('os_linux_ver')))
self.defaultPrint("%s\n"%_("Hardware"))
self.printSUCCESS(_("Machine hardware name")+": %s"%
self.clVars.Get('os_arch_machine'))
self.clVars.Get('os_install_arch_machine'))
self.printSUCCESS(_("Quantity processors")+": %s"%
self.clVars.Get('hr_cpu_num'))
self.printSUCCESS(_("Videocard vendor")+": %s"%
@ -659,8 +658,8 @@ class cl_install(color_print):
tableObj.printReport(False)
self.defaultPrint("%s\n"%_("Network services"))
self.printSUCCESS(_("Authentification")+": %s"%
"<needed>")
#self.printSUCCESS(_("Authentification")+": %s"%
# "<needed>")
self.printSUCCESS(_("PROXY")+": %s"%
self.clVars.Get('os_install_proxy') or "no")
self.printSUCCESS(_("NTP")+": %s"%
@ -703,7 +702,6 @@ class cl_install(color_print):
"""Apply templates for root of system."""
#self.clVars.Set("cl_root_path",directory, True)
self.clVars.Set("cl_chroot_path",directory, True)
self.clVars.Set("cl_pass_action", "install", True)
self.clTempl = template(self.clVars)
dirsFiles = self.clTempl.applyTemplates()
if self.clTempl.getError():
@ -1209,8 +1207,6 @@ class cl_install(color_print):
return True
def writeInstallVars(self):
self.clVars.Write('cl_pass_action','template', True,
header="install")
if not self.clVars.WriteVars(header="install"):
raise InstallError(self.getError())

@ -208,7 +208,10 @@ class install_cmd(cl_install,share_cmd):
self.printERROR(_('variable %s not found')%k)
return False
if options.live:
self.clVars.Set('cl_image','',True)
#self.clVars.Set('cl_image','',True)
self.clVars.Set('cl_install_action','merge',True)
else:
self.clVars.Set('cl_install_action','system',True)
if options.s:
self.setLinuxName(options.s.upper())

@ -31,6 +31,8 @@ class Data:
# program version
cl_ver = {'value':__version__}
cl_install_action = {'value':'merge'}
# install maching architecture
os_install_arch_machine = {'mode':'w'}

Loading…
Cancel
Save