|
|
@ -753,7 +753,7 @@ class cl_install(color_print):
|
|
|
|
listDisks = map(convObj, listDisks)
|
|
|
|
listDisks = map(convObj, listDisks)
|
|
|
|
# detect previous system if not specified root partition
|
|
|
|
# detect previous system if not specified root partition
|
|
|
|
if not filter(lambda x: x['mountPoint'] == '/',listDisks):
|
|
|
|
if not filter(lambda x: x['mountPoint'] == '/',listDisks):
|
|
|
|
prevRootDev = self.detectPreviousSystem()
|
|
|
|
prevRootDev = self.clVars.Get('os_install_dev_from')
|
|
|
|
if prevRootDev:
|
|
|
|
if prevRootDev:
|
|
|
|
listDisks += map(convObj, [{'mountPoint': '',
|
|
|
|
listDisks += map(convObj, [{'mountPoint': '',
|
|
|
|
'options': [],
|
|
|
|
'options': [],
|
|
|
@ -1041,16 +1041,6 @@ class cl_install(color_print):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return ""
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
def detectPreviousSystem(self):
|
|
|
|
|
|
|
|
"""Detect previous system"""
|
|
|
|
|
|
|
|
calculate1ini = "/etc/calculate/calculate.ini"
|
|
|
|
|
|
|
|
calculate1param = "install.devfrom"
|
|
|
|
|
|
|
|
if pathexists(calculate1ini):
|
|
|
|
|
|
|
|
return reduce(lambda x,y: [y.rpartition('=')[2].strip()],
|
|
|
|
|
|
|
|
filter(lambda x: x.partition("=")[0] == calculate1param,
|
|
|
|
|
|
|
|
open(calculate1ini,"r")),
|
|
|
|
|
|
|
|
None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def installBootloader(self,target, grubDisk="0"):
|
|
|
|
def installBootloader(self,target, grubDisk="0"):
|
|
|
|
"""Install boot loader
|
|
|
|
"""Install boot loader
|
|
|
|
|
|
|
|
|
|
|
@ -1244,8 +1234,11 @@ class cl_install(color_print):
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
def writeInstallVars(self):
|
|
|
|
def writeInstallVars(self):
|
|
|
|
if not self.clVars.WriteVars(header="install"):
|
|
|
|
if self.Get('os_root_type') == 'hdd':
|
|
|
|
raise InstallError(self.getError())
|
|
|
|
self.clVars.Write("os_install_dev_from",
|
|
|
|
|
|
|
|
self.clVars.Get('os_root_dev'), header="install")
|
|
|
|
|
|
|
|
#if not self.clVars.WriteVars(header="install"):
|
|
|
|
|
|
|
|
# raise InstallError(self.getError())
|
|
|
|
|
|
|
|
|
|
|
|
def installSystem(self, force=False, bootDisk=None, users=[]):
|
|
|
|
def installSystem(self, force=False, bootDisk=None, users=[]):
|
|
|
|
"""install System by current variable enviroment"""
|
|
|
|
"""install System by current variable enviroment"""
|
|
|
@ -1370,7 +1363,7 @@ the system") + " (yes/no)"
|
|
|
|
# install distributive
|
|
|
|
# install distributive
|
|
|
|
self.printSUCCESS(
|
|
|
|
self.printSUCCESS(
|
|
|
|
_("Unpacking system image into target")+" ... ",printBR=False)
|
|
|
|
_("Unpacking system image into target")+" ... ",printBR=False)
|
|
|
|
self.clVars('os_grub_conf')
|
|
|
|
self.clVars.Get('os_grub_conf')
|
|
|
|
targetDistr.installFrom(sourceDistr)
|
|
|
|
targetDistr.installFrom(sourceDistr)
|
|
|
|
|
|
|
|
|
|
|
|
self.printSUCCESS("Unpacking complete")
|
|
|
|
self.printSUCCESS("Unpacking complete")
|
|
|
|