|
|
@ -596,7 +596,8 @@ class cl_install(color_print):
|
|
|
|
|
|
|
|
|
|
|
|
def applyTemplatesForSystem(self):
|
|
|
|
def applyTemplatesForSystem(self):
|
|
|
|
"""Apply templates for root of system."""
|
|
|
|
"""Apply templates for root of system."""
|
|
|
|
self.clVars.Set("cl_root_path","/", True)
|
|
|
|
#self.clVars.Set("cl_root_path","/", True)
|
|
|
|
|
|
|
|
self.clVars.Set("cl_chroot_path","/", True)
|
|
|
|
self.clVars.Set("cl_pass_action", "system", True)
|
|
|
|
self.clVars.Set("cl_pass_action", "system", True)
|
|
|
|
self.clTempl = template(self.clVars)
|
|
|
|
self.clTempl = template(self.clVars)
|
|
|
|
dirsFiles = self.clTempl.applyTemplates()
|
|
|
|
dirsFiles = self.clTempl.applyTemplates()
|
|
|
@ -685,7 +686,8 @@ class cl_install(color_print):
|
|
|
|
|
|
|
|
|
|
|
|
def applyTemplates(self,directory):
|
|
|
|
def applyTemplates(self,directory):
|
|
|
|
"""Apply templates for root of system."""
|
|
|
|
"""Apply templates for root of system."""
|
|
|
|
self.clVars.Set("cl_root_path",directory, True)
|
|
|
|
#self.clVars.Set("cl_root_path",directory, True)
|
|
|
|
|
|
|
|
self.clVars.Set("cl_chroot_path",directory, True)
|
|
|
|
self.clVars.Set("cl_pass_action", "system", True)
|
|
|
|
self.clVars.Set("cl_pass_action", "system", True)
|
|
|
|
self.clTempl = template(self.clVars)
|
|
|
|
self.clTempl = template(self.clVars)
|
|
|
|
dirsFiles = self.clTempl.applyTemplates()
|
|
|
|
dirsFiles = self.clTempl.applyTemplates()
|
|
|
@ -1124,8 +1126,25 @@ class cl_install(color_print):
|
|
|
|
def configureSystem(self):
|
|
|
|
def configureSystem(self):
|
|
|
|
"""configure current system"""
|
|
|
|
"""configure current system"""
|
|
|
|
self.printSUCCESS("Configurating system")
|
|
|
|
self.printSUCCESS("Configurating system")
|
|
|
|
|
|
|
|
error = None
|
|
|
|
|
|
|
|
try:
|
|
|
|
if self.clVars.Get('os_root_type') == "livecd":
|
|
|
|
if self.clVars.Get('os_root_type') == "livecd":
|
|
|
|
self.applyTemplates('/')
|
|
|
|
self.applyTemplates('/')
|
|
|
|
|
|
|
|
except (InstallError,DistributiveError),e:
|
|
|
|
|
|
|
|
error = e
|
|
|
|
|
|
|
|
except (Exception),e:
|
|
|
|
|
|
|
|
error = ""
|
|
|
|
|
|
|
|
for i in apply(traceback.format_exception, sys.exc_info()):
|
|
|
|
|
|
|
|
error += i
|
|
|
|
|
|
|
|
except KeyboardInterrupt,e:
|
|
|
|
|
|
|
|
self.defaultPrint("\n")
|
|
|
|
|
|
|
|
self.printWARNING("Interrupting the configuration")
|
|
|
|
|
|
|
|
error = _("Configuration manually interrupt")
|
|
|
|
|
|
|
|
if error:
|
|
|
|
|
|
|
|
for line in filter(lambda x: x,str(error).split('\n')):
|
|
|
|
|
|
|
|
self.printERROR(line)
|
|
|
|
|
|
|
|
self.printERROR(_("System configuration failed"))
|
|
|
|
|
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
def installSystem(self, force=False, bootDisk=None, users=[]):
|
|
|
|
def installSystem(self, force=False, bootDisk=None, users=[]):
|
|
|
@ -1266,6 +1285,8 @@ the system") + " (yes/no)"
|
|
|
|
|
|
|
|
|
|
|
|
except (InstallError,DistributiveError),e:
|
|
|
|
except (InstallError,DistributiveError),e:
|
|
|
|
error = e
|
|
|
|
error = e
|
|
|
|
|
|
|
|
#for i in apply(traceback.format_exception, sys.exc_info()):
|
|
|
|
|
|
|
|
# print i
|
|
|
|
except (Exception),e:
|
|
|
|
except (Exception),e:
|
|
|
|
error = ""
|
|
|
|
error = ""
|
|
|
|
for i in apply(traceback.format_exception, sys.exc_info()):
|
|
|
|
for i in apply(traceback.format_exception, sys.exc_info()):
|
|
|
@ -1290,6 +1311,7 @@ the system") + " (yes/no)"
|
|
|
|
if error:
|
|
|
|
if error:
|
|
|
|
for line in filter(lambda x: x,str(error).split('\n')):
|
|
|
|
for line in filter(lambda x: x,str(error).split('\n')):
|
|
|
|
self.printERROR(line)
|
|
|
|
self.printERROR(line)
|
|
|
|
|
|
|
|
self.printERROR(_("System installation failed"))
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
self.printSUCCESS(_("System successfully installed"))
|
|
|
|
self.printSUCCESS(_("System successfully installed"))
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|