|
|
|
@ -112,7 +112,8 @@ class install_cmd(share_cmd):
|
|
|
|
|
check_values=self.checkOpts)
|
|
|
|
|
self.logicObj = cl_install()
|
|
|
|
|
# names incompatible options with --live
|
|
|
|
|
self.optionsLiveIncompatible = ["d", "b", "mbr", "w", "f", "s"]
|
|
|
|
|
self.optionsLiveIncompatible = ["type","d", "b", "mbr",
|
|
|
|
|
"w", "f", "s","install","uninstall","build","u"]
|
|
|
|
|
|
|
|
|
|
def _getNamesAllSetOptions(self):
|
|
|
|
|
"""Get list set options"""
|
|
|
|
@ -246,13 +247,14 @@ class install_cmd(share_cmd):
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def setAction(self,live):
|
|
|
|
|
"""Set action by configuration or install system"""
|
|
|
|
|
self.logicObj.clVars.Set('cl_action',
|
|
|
|
|
"merge" if live else "system",True)
|
|
|
|
|
|
|
|
|
|
def checkAndSetInstallOptions(self,diskOptions, swapOptions, bindOptions,
|
|
|
|
|
usersOptions):
|
|
|
|
|
"""Check and set disk, swap and bind cmd options"""
|
|
|
|
|
if self.optobj.values.live:
|
|
|
|
|
self.logicObj.clVars.Set('cl_action','merge',True)
|
|
|
|
|
else:
|
|
|
|
|
self.logicObj.clVars.Set('cl_action','system',True)
|
|
|
|
|
if self.optobj.values.s:
|
|
|
|
|
self.logicObj.setLinuxName(self.optobj.values.s.upper())
|
|
|
|
|
if self.optobj.values.build:
|
|
|
|
@ -380,18 +382,3 @@ class install_cmd(share_cmd):
|
|
|
|
|
return True
|
|
|
|
|
else:
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def setAutoupdate(self, optObj):
|
|
|
|
|
"""Установка переменных"""
|
|
|
|
|
if optObj.set:
|
|
|
|
|
for vals in optObj.set:
|
|
|
|
|
for val in vals.split(','):
|
|
|
|
|
k,o,v = val.partition('=')
|
|
|
|
|
if k == "cl_autoupdate_set":
|
|
|
|
|
if self.logicObj.clVars.exists(k):
|
|
|
|
|
if not self.logicObj.clVars.SetWriteVar(k,v):
|
|
|
|
|
return False
|
|
|
|
|
else:
|
|
|
|
|
self.printERROR(_('variable %s not found')%k)
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
|