|
|
@ -95,9 +95,8 @@ class cl_install(color_print):
|
|
|
|
|
|
|
|
|
|
|
|
def printInfo(self,sourceDistr,targetDistr):
|
|
|
|
def printInfo(self,sourceDistr,targetDistr):
|
|
|
|
self.printSUCCESS(_("Installation %s %s")%
|
|
|
|
self.printSUCCESS(_("Installation %s %s")%
|
|
|
|
("<needed>","<needed>"))
|
|
|
|
(self.clVars.Get('os_linux_name'),
|
|
|
|
# (self.clVars.Get('os_linux_name'),
|
|
|
|
self.clVars.Get('os_linux_subname')))
|
|
|
|
# self.clVars.Get('os_linux_subname')))
|
|
|
|
|
|
|
|
self.defaultPrint(_("System information\n"))
|
|
|
|
self.defaultPrint(_("System information\n"))
|
|
|
|
self.printSUCCESS(_("Computer name")+": %s"%
|
|
|
|
self.printSUCCESS(_("Computer name")+": %s"%
|
|
|
|
self.clVars.Get('os_net_hostname'))
|
|
|
|
self.clVars.Get('os_net_hostname'))
|
|
|
@ -106,8 +105,7 @@ class cl_install(color_print):
|
|
|
|
self.printSUCCESS(_("Network devices")+": %s"%
|
|
|
|
self.printSUCCESS(_("Network devices")+": %s"%
|
|
|
|
self.clVars.Get("os_net_interfaces_info"))
|
|
|
|
self.clVars.Get("os_net_interfaces_info"))
|
|
|
|
self.printSUCCESS(_("Installed system")+": %s %s"%
|
|
|
|
self.printSUCCESS(_("Installed system")+": %s %s"%
|
|
|
|
(self.clVars.Get('os_linux_name'),
|
|
|
|
(self.old_os_linux_name, self.old_os_linux_ver))
|
|
|
|
self.clVars.Get('os_linux_ver')))
|
|
|
|
|
|
|
|
self.defaultPrint(_("Hardware\n"))
|
|
|
|
self.defaultPrint(_("Hardware\n"))
|
|
|
|
self.printSUCCESS(_("Machine hardware name")+": %s"%
|
|
|
|
self.printSUCCESS(_("Machine hardware name")+": %s"%
|
|
|
|
self.clVars.Get('os_arch_machine'))
|
|
|
|
self.clVars.Get('os_arch_machine'))
|
|
|
@ -184,10 +182,13 @@ class cl_install(color_print):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
targetDistr = self.getTargetDistributive(disk,buildermode)
|
|
|
|
targetDistr = self.getTargetDistributive(disk,buildermode)
|
|
|
|
distRep = DistributiveRepository('/usr/calculate/share/linux')
|
|
|
|
distRep = DistributiveRepository('/usr/calculate/share/linux')
|
|
|
|
osname = osname or self.clVars.Get('os_linux_shortname')
|
|
|
|
self.old_os_linux_name = self.clVars.Get('os_linux_shortname')
|
|
|
|
|
|
|
|
self.old_os_linux_ver = self.clVars.Get('os_linux_ver')
|
|
|
|
|
|
|
|
if osname:
|
|
|
|
|
|
|
|
self.clVars.Set('os_linux_shortname',osname.upper())
|
|
|
|
sourceDistr = distRep.getLastDistributive(
|
|
|
|
sourceDistr = distRep.getLastDistributive(
|
|
|
|
march=self.clVars.Get('os_arch_machine'),
|
|
|
|
march=self.clVars.Get('os_arch_machine'),
|
|
|
|
shortname=osname.lower())
|
|
|
|
shortname=self.clVars.Get('os_linux_shortname').lower())
|
|
|
|
if sourceDistr:
|
|
|
|
if sourceDistr:
|
|
|
|
# print info
|
|
|
|
# print info
|
|
|
|
self.printInfo(sourceDistr,targetDistr)
|
|
|
|
self.printInfo(sourceDistr,targetDistr)
|
|
|
@ -211,6 +212,7 @@ class cl_install(color_print):
|
|
|
|
self.prepareBoot(targetDistr)
|
|
|
|
self.prepareBoot(targetDistr)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.printWARNING("No update available.")
|
|
|
|
self.printWARNING("No update available.")
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
except (InstallError,DistributiveError),e:
|
|
|
|
except (InstallError,DistributiveError),e:
|
|
|
|
error = e
|
|
|
|
error = e
|
|
|
@ -223,7 +225,7 @@ class cl_install(color_print):
|
|
|
|
self.printSUCCESS(_("Releasing source distributive"))
|
|
|
|
self.printSUCCESS(_("Releasing source distributive"))
|
|
|
|
sourceDistr.close()
|
|
|
|
sourceDistr.close()
|
|
|
|
if targetDistr:
|
|
|
|
if targetDistr:
|
|
|
|
self.printSUCCESS(_("Unmount installed system volume"))
|
|
|
|
self.printSUCCESS(_("Unmount target system volume"))
|
|
|
|
targetDistr.close()
|
|
|
|
targetDistr.close()
|
|
|
|
except KeyboardInterrupt,e:
|
|
|
|
except KeyboardInterrupt,e:
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|