|
|
|
@ -830,40 +830,22 @@ class cl_install(color_print, SignalInterrupt):
|
|
|
|
|
return instnextres
|
|
|
|
|
return curnextres
|
|
|
|
|
|
|
|
|
|
def printInstallTables(self):
|
|
|
|
|
"""Print install report"""
|
|
|
|
|
title, headerList, dataList = self.generateTableData()
|
|
|
|
|
tableObj = tableReport("", headerList, dataList)
|
|
|
|
|
tableObj.printReport(False)
|
|
|
|
|
title, headerList, dataList = self.generateTableBindData()
|
|
|
|
|
if dataList:
|
|
|
|
|
tableObj = tableReport(title, headerList, dataList)
|
|
|
|
|
tableObj.printReport(False)
|
|
|
|
|
|
|
|
|
|
def printInfo(self,update=False):
|
|
|
|
|
self.printSUCCESS(_("Installation") + " Calculate Linux")
|
|
|
|
|
self.defaultPrint("%s\n"%_("System information"))
|
|
|
|
|
self.printSUCCESS(_("Computer name")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_net_hostname'))
|
|
|
|
|
self.printSUCCESS(_("Domain name")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_net_domain'))
|
|
|
|
|
self.printSUCCESS(_("Network devices")+": %s"%
|
|
|
|
|
self.clVars.Get("os_net_interfaces_info"))
|
|
|
|
|
self.printSUCCESS(_("Installed system")+": %s %s"%
|
|
|
|
|
(self.clVars.Get('os_linux_name'),
|
|
|
|
|
self.clVars.Get('os_linux_ver')))
|
|
|
|
|
self.defaultPrint("%s\n"%_("Hardware"))
|
|
|
|
|
self.printSUCCESS(_("Machine hardware name")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_arch_machine'))
|
|
|
|
|
self.printSUCCESS(_("Quantity processors")+": %s"%
|
|
|
|
|
self.clVars.Get('hr_cpu_num'))
|
|
|
|
|
self.printSUCCESS(_("Videocard vendor")+": %s"%
|
|
|
|
|
self.clVars.Get('hr_video'))
|
|
|
|
|
self.printSUCCESS(_("{0} video driver").format("Xorg")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_x11_video_drv'))
|
|
|
|
|
self.printSUCCESS(_("Screen resolution")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_x11_resolution'))
|
|
|
|
|
self.defaultPrint("%s\n"%_("Localization"))
|
|
|
|
|
self.printSUCCESS(_("Language")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_locale_lang'))
|
|
|
|
|
self.printSUCCESS(_("Keymap")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_locale_xkbname'))
|
|
|
|
|
self.printSUCCESS(_("Timezone")+": %s"%
|
|
|
|
|
self.clVars.Get('os_install_clock_timezone'))
|
|
|
|
|
|
|
|
|
|
self.defaultPrint("%s\n"%_("Location"))
|
|
|
|
|
clGet = self.clVars.Get
|
|
|
|
|
installedSystem = "%s %s"%(clGet('os_linux_name'),
|
|
|
|
|
clGet('os_linux_ver'))
|
|
|
|
|
mbrDevice = self.clVars.Get('os_install_mbr')
|
|
|
|
|
addonMbrInfo = ""
|
|
|
|
|
if not mbrDevice in ("","off"):
|
|
|
|
|
pathVendor = "/sys/block/%s/device/vendor"%mbrDevice
|
|
|
|
|
pathModel = "/sys/block/%s/device/model"%mbrDevice
|
|
|
|
@ -871,30 +853,67 @@ class cl_install(color_print, SignalInterrupt):
|
|
|
|
|
addonMbrInfo = " (%s %s)"% \
|
|
|
|
|
(open(pathVendor,'r').read().strip(),
|
|
|
|
|
open(pathModel,'r').read().strip())
|
|
|
|
|
self.printSUCCESS(_("Master boot record")+" (MBR): /dev/%s%s"%
|
|
|
|
|
(self.clVars.Get('os_install_mbr'),addonMbrInfo))
|
|
|
|
|
else:
|
|
|
|
|
addonMbrInfo = ""
|
|
|
|
|
mbrdisk = "/dev/%s%s"%(clGet('os_install_mbr'),addonMbrInfo)
|
|
|
|
|
else:
|
|
|
|
|
self.printSUCCESS(_("Master boot record")+
|
|
|
|
|
" (MBR): %s"%_("not changed"))
|
|
|
|
|
|
|
|
|
|
title, headerList, dataList = self.generateTableData()
|
|
|
|
|
tableObj = tableReport("", headerList, dataList)
|
|
|
|
|
tableObj.printReport(False)
|
|
|
|
|
title, headerList, dataList = self.generateTableBindData()
|
|
|
|
|
if dataList:
|
|
|
|
|
tableObj = tableReport(title, headerList, dataList)
|
|
|
|
|
tableObj.printReport(False)
|
|
|
|
|
|
|
|
|
|
self.defaultPrint("%s\n"%_("Network services"))
|
|
|
|
|
#self.printSUCCESS(_("Authentification")+": %s"%
|
|
|
|
|
# "<needed>")
|
|
|
|
|
self.printSUCCESS(_("PROXY")+": %s"%
|
|
|
|
|
(self.clVars.Get('os_install_proxy') or _("none")))
|
|
|
|
|
self.printSUCCESS(_("NTP")+": %s"%
|
|
|
|
|
(self.clVars.Get('os_install_ntp') or _("none")))
|
|
|
|
|
|
|
|
|
|
self.defaultPrint("%s\n"%_("Perform pre-install checkups"))
|
|
|
|
|
mbrdisk = _("not changed")
|
|
|
|
|
|
|
|
|
|
flash = clGet('os_install_root_type')=="flash"
|
|
|
|
|
usbhdd = clGet('os_install_root_type')=="usb-hdd"
|
|
|
|
|
hdd = clGet('os_install_root_type')=="hdd"
|
|
|
|
|
|
|
|
|
|
printData = [
|
|
|
|
|
[(_("System information"),True),
|
|
|
|
|
(_("Computer name"),clGet('os_install_net_hostname'),not flash),
|
|
|
|
|
(_("Domain name"),clGet('os_install_net_domain'),not flash),
|
|
|
|
|
(_("Network devices"),clGet('os_net_interfaces_info'),hdd),
|
|
|
|
|
(_("Installed system"),installedSystem,True)
|
|
|
|
|
],
|
|
|
|
|
[(_("Hardware"),hdd),
|
|
|
|
|
(_("Machine hardware name"),
|
|
|
|
|
clGet('os_install_arch_machine'),True),
|
|
|
|
|
(_("Quantity processors"),clGet('hr_cpu_num'),True),
|
|
|
|
|
(_("Videocard vendor"),clGet('hr_video'),True),
|
|
|
|
|
(_("{0} video driver").format("Xorg"),
|
|
|
|
|
clGet('os_install_x11_video_drv'),True),
|
|
|
|
|
(_("Screen resolution"),clGet('os_install_x11_resolution'),True)
|
|
|
|
|
],
|
|
|
|
|
[(_("Localization"),not flash),
|
|
|
|
|
(_("Language"),
|
|
|
|
|
clGet('os_install_locale_lang'),True),
|
|
|
|
|
(_("Keymap"),clGet('os_install_locale_xkbname'),True),
|
|
|
|
|
(_("Timezone"),clGet('os_install_clock_timezone'),True),
|
|
|
|
|
],
|
|
|
|
|
[(_("Location"),True),
|
|
|
|
|
(_("Master boot record")+" (MBR)",mbrdisk,True),
|
|
|
|
|
(self.printInstallTables,None,True)
|
|
|
|
|
],
|
|
|
|
|
[(_("Network services"),hdd),
|
|
|
|
|
(_("PROXY"),
|
|
|
|
|
clGet('os_install_proxy') or _("none"),True),
|
|
|
|
|
(_("NTP"),clGet('os_install_ntp') or _("none"),True)
|
|
|
|
|
],
|
|
|
|
|
[(_("Perform pre-install checkups"),True)]
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
for section in printData:
|
|
|
|
|
sectionname,condition = section[0]
|
|
|
|
|
# skip section
|
|
|
|
|
if not (callable(condition) and condition() or \
|
|
|
|
|
not callable(condition) and condition ):
|
|
|
|
|
continue
|
|
|
|
|
self.defaultPrint("%s\n"%sectionname)
|
|
|
|
|
for label, data, cond in section[1:]:
|
|
|
|
|
if not (callable(cond) and cond() or \
|
|
|
|
|
not callable(cond) and cond ):
|
|
|
|
|
continue
|
|
|
|
|
if callable(label):
|
|
|
|
|
label()
|
|
|
|
|
else:
|
|
|
|
|
self.printSUCCESS(label+": %s"%data)
|
|
|
|
|
|
|
|
|
|
# preinstall checkups
|
|
|
|
|
subname = self.clVars.Get('os_install_linux_subname')
|
|
|
|
|
subname = (" %s"%subname) if subname else ""
|
|
|
|
|
buildvar = self.clVars.Get('os_install_linux_build')
|
|
|
|
|