Add template applying for installation on flash.

netsetup
Mike Hiretsky 14 years ago
parent 08554e3932
commit 9ba8b61493

Binary file not shown.

@ -68,17 +68,31 @@ class fillVars(object, glob_attr):
actionsMap = {'merge':'up',
'system':'up'}
cl_action = self.Get('cl_action')
clRootType = self.Get('os_install_root_type')
if cl_action == "system" and clRootType == "flash":
return ""
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_assemble_prepare_action') != "":
return ""
if self.Get('os_install_root_type') == "flash":
return ""
if self.Get('cl_action') == 'system':
return "up"
else:
return ""
def get_cl_install_flash_action(self):
"""Need perform templates for install:flash"""
actionsMap = {'system':'up'}
clAction = self.Get('cl_action')
clRootType = self.Get('os_install_root_type')
if clAction == 'system' and clRootType == 'flash':
return "up"
return ""
def get_cl_install_scratch_action(self):
"""Need perform templates for install:system"""
if self.Get('cl_assemble_prepare_action') != "":

@ -947,6 +947,18 @@ class cl_install(color_print, SignalInterrupt):
self.clTempl.closeFiles()
self.clTempl = None
def applyTemplatesFlash(self,directory):
"""Apply templates for root of system."""
#self.clVars.Set("cl_root_path",directory, True)
self.clVars.Set("cl_chroot_path","/", True)
self.clVars.Set("cl_root_path",directory, True)
self.clTempl = template(self.clVars,cltObj=False)
dirsFiles = self.clTempl.applyTemplates()
if self.clTempl.getError():
raise InstallError(self.clTempl.getError())
else:
return dirsFiles
def applyTemplates(self,directory):
"""Apply templates for root of system."""
#self.clVars.Set("cl_root_path",directory, True)
@ -1846,6 +1858,13 @@ the system") + " (yes/no)"
if self.clVars.Get('os_install_root_type') != "flash":
self.afterCopyHDDinstall(targetDistr, addUsers,
changePwdUsers, migrateUsers)
else:
# join templates
self.printMessageForTest(
_("Configure of flash installation"))
self.applyTemplatesFlash(targetDistr.getDirectory())
self.printByResult(True)
self.closeClTemplate()
# change boot config
if self.clVars.Get('os_install_mbr'):
self.printMessageForTest(_("Preparing system for reboot"))

@ -43,6 +43,9 @@ class Data:
# need perform templates for install:scratch
cl_install_scratch_action = {}
# need perform templates for install:flash
cl_install_flash_action = {}
# TODO: depricated
os_install_scratch_action = {'hide':True}

Loading…
Cancel
Save