Change action variable

master3.3
Mike Hiretsky 14 years ago
parent f8ddaae3df
commit 9cf7375cb1

@ -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']

@ -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())

@ -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'}

Loading…
Cancel
Save