From ff55cf52667212d64e2f07a9d84eccd9076eb050 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Fri, 6 Aug 2010 13:23:32 +0400 Subject: [PATCH] Change name of action variable. Action names merge and system. --- pym/cl_fill_install.py | 11 ++++++++--- pym/cl_install.py | 14 +++++--------- pym/cl_install_cmd.py | 5 ++++- pym/cl_vars_install.py | 2 ++ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py index 7ee4665..2b27a45 100644 --- a/pym/cl_fill_install.py +++ b/pym/cl_fill_install.py @@ -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: diff --git a/pym/cl_install.py b/pym/cl_install.py index e1134c2..589665f 100644 --- a/pym/cl_install.py +++ b/pym/cl_install.py @@ -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"% - "") + #self.printSUCCESS(_("Authentification")+": %s"% + # "") 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()) diff --git a/pym/cl_install_cmd.py b/pym/cl_install_cmd.py index 23f7dd3..e9dbcf6 100644 --- a/pym/cl_install_cmd.py +++ b/pym/cl_install_cmd.py @@ -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()) diff --git a/pym/cl_vars_install.py b/pym/cl_vars_install.py index 134afc4..641fe45 100644 --- a/pym/cl_vars_install.py +++ b/pym/cl_vars_install.py @@ -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'}