diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py index 2b27a45..dafb7cf 100644 --- a/pym/cl_fill_install.py +++ b/pym/cl_fill_install.py @@ -32,7 +32,22 @@ class fillVars(object, glob_attr): "/lib", "/lib32", "/lib64", "/opt", "/proc", "/sbin", "/sys", "/usr", "/var"] - + + def get_cl_install_merge_action(self): + """Need perform templates for install:merge or install:unmerge""" + actionsMap = {'merge':'on', + 'system':'on', + 'unmerge':'off'} + cl_action = self.Get('cl_action') + return actionsMap[cl_action] if cl_action in actionsMap else "" + + def get_cl_install_system_action(self): + """Need perform templates for install:system""" + if self.Get('cl_action') == 'system': + return "on" + else: + return "" + def get_os_net_interfaces_info(self): """Информация о существующих сетевых интерфейсах""" netInterfaces=self.Get("os_net_interfaces") @@ -459,7 +474,7 @@ class fillVars(object, glob_attr): def get_cl_image(self): """Get image file from distributive repository""" - if self.Get('cl_install_action') != 'system': + if self.Get('cl_action') != 'system': return "" if self.Get('os_root_type') == "livecd": livedistr = ['/mnt/livecd'] diff --git a/pym/cl_install_cmd.py b/pym/cl_install_cmd.py index e9dbcf6..896b862 100644 --- a/pym/cl_install_cmd.py +++ b/pym/cl_install_cmd.py @@ -209,9 +209,9 @@ class install_cmd(cl_install,share_cmd): return False if options.live: #self.clVars.Set('cl_image','',True) - self.clVars.Set('cl_install_action','merge',True) + self.clVars.Set('cl_action','merge',True) else: - self.clVars.Set('cl_install_action','system',True) + self.clVars.Set('cl_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 641fe45..05183d6 100644 --- a/pym/cl_vars_install.py +++ b/pym/cl_vars_install.py @@ -31,7 +31,14 @@ class Data: # program version cl_ver = {'value':__version__} - cl_install_action = {'value':'merge'} + # work action + cl_action = {'value':'merge'} + + # need perform templates for install:merge or install:unmerge + cl_install_merge_action = {} + + # need perform templates for install:system + cl_install_system_action = {} # install maching architecture os_install_arch_machine = {'mode':'w'}