|
|
|
@ -84,7 +84,7 @@ class install_cmd(cl_install,opt,share_cmd):
|
|
|
|
|
self.checkVarSyntax(values)
|
|
|
|
|
return (values, args)
|
|
|
|
|
|
|
|
|
|
def processSetLang(self,lang):
|
|
|
|
|
def setLang(self,lang):
|
|
|
|
|
"""Process set locales by lang"""
|
|
|
|
|
if self.setAllLocaleByLang(lang):
|
|
|
|
|
return True
|
|
|
|
@ -92,20 +92,38 @@ class install_cmd(cl_install,opt,share_cmd):
|
|
|
|
|
self.printERROR(_("specified lang %s is unsupported")%lang)
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def processSetVars(self,vars):
|
|
|
|
|
def setVars(self,options):
|
|
|
|
|
"""Process setting values for variables"""
|
|
|
|
|
for vals in vars:
|
|
|
|
|
for val in vals.split(','):
|
|
|
|
|
k,o,v = val.partition('=')
|
|
|
|
|
if self.clVars.exists(k):
|
|
|
|
|
if not self.clVars.SetWriteVar(k,v):
|
|
|
|
|
if options.set:
|
|
|
|
|
for vals in options.set:
|
|
|
|
|
for val in vals.split(','):
|
|
|
|
|
k,o,v = val.partition('=')
|
|
|
|
|
if self.clVars.exists(k):
|
|
|
|
|
if not self.clVars.SetWriteVar(k,v):
|
|
|
|
|
return False
|
|
|
|
|
else:
|
|
|
|
|
self.printERROR(_('variable %s not found')%k)
|
|
|
|
|
return False
|
|
|
|
|
if options.d:
|
|
|
|
|
if not options.d in self.clVars.Get('os_disk_dev'):
|
|
|
|
|
self.error(_("Wrong target drive name %s"%options.d))
|
|
|
|
|
else:
|
|
|
|
|
osdiskload = filter(lambda x: x[1] and x[0] == options.d,
|
|
|
|
|
zip(self.clVars.Get('os_disk_dev'),
|
|
|
|
|
self.clVars.Get('os_disk_load')))
|
|
|
|
|
if len(osdiskload) > 0:
|
|
|
|
|
self.error(
|
|
|
|
|
_("Specified drive '%s' mounted to '%s' on loaded system"%
|
|
|
|
|
(options.d,osdiskload[0][1])))
|
|
|
|
|
else:
|
|
|
|
|
self.printERROR(_('variable %s not found')%k)
|
|
|
|
|
return False
|
|
|
|
|
self.clVars.Set('os_root_dev',options.d,True)
|
|
|
|
|
if options.s:
|
|
|
|
|
self.old_os_linux_name = self.clVars.Get('os_linux_shortname')
|
|
|
|
|
self.old_os_linux_ver = self.clVars.Get('os_linux_ver')
|
|
|
|
|
self.clVars.Set('os_linux_shortname',options.s.upper(),True)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def processDisplayVars(self,vars):
|
|
|
|
|
def displayVars(self,vars):
|
|
|
|
|
"""Process displaying variables"""
|
|
|
|
|
terms = vars.split(",")
|
|
|
|
|
# if value of vars is "all" print all variables
|
|
|
|
@ -115,7 +133,7 @@ class install_cmd(cl_install,opt,share_cmd):
|
|
|
|
|
else:
|
|
|
|
|
self.clVars.printVars(terms)
|
|
|
|
|
|
|
|
|
|
def processTemplateSelect(self,template):
|
|
|
|
|
def templateSelect(self,template):
|
|
|
|
|
"""Process template appling"""
|
|
|
|
|
if self.applyTemplatesForSystem():
|
|
|
|
|
return True
|
|
|
|
@ -123,8 +141,7 @@ class install_cmd(cl_install,opt,share_cmd):
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def installSystem(self):
|
|
|
|
|
if cl_install.installSystem(self,disk=self.values.d,
|
|
|
|
|
buildermode=self.values.b,osname=self.values.s):
|
|
|
|
|
if cl_install.installSystem(self,buildermode=self.values.b):
|
|
|
|
|
print "installation complete"
|
|
|
|
|
return True
|
|
|
|
|
else:
|
|
|
|
|