Move hostname from install system opt to live and install opts.

netsetup 2.2.4
Mike Hiretsky 14 years ago
parent ad55ca9ac0
commit 97c21ae259

@ -239,16 +239,26 @@ class install_cmd(share_cmd):
self.printERROR(_("specified lang %s is unsupported")%lang)
return False
def setProxyNtp(self,proxy,ntp):
def setProxyNtpHostname(self,proxy,ntp,hostname):
"""Process set locales by lang"""
if proxy:
if not self.logicObj.clVars.SetWriteVar('os_install_proxy',proxy):
self.printERROR(get_install_errors(),printBR=False)
return False
elif ntp:
if ntp:
if not self.logicObj.clVars.SetWriteVar('os_install_ntp',ntp):
self.printERROR(get_install_errors(),printBR=False)
return False
if hostname:
if "." in hostname:
hostname, op, domain = hostname.partition('.')
self.logicObj.clVars.Set('os_install_net_hostname',
hostname,True)
self.logicObj.clVars.Set('os_install_net_domain',
domain,True)
else:
self.logicObj.clVars.Set('os_install_net_hostname',
hostname,True)
return True
def setVars(self,options):
@ -281,17 +291,6 @@ class install_cmd(share_cmd):
self.optobj.values.march,True)
if self.optobj.values.nouuid:
self.logicObj.clVars.Set('cl_uuid_set','off',True)
if self.optobj.values.hostname:
hostname = self.optobj.values.hostname
if "." in hostname:
hostname, op, domain = hostname.partition('.')
self.logicObj.clVars.Set('os_install_net_hostname',
hostname,True)
self.logicObj.clVars.Set('os_install_net_domain',
domain,True)
else:
self.logicObj.clVars.Set('os_install_net_hostname',
hostname,True)
if self.optobj.values.build:
self.logicObj.clVars.Set('os_install_scratch',"on",True)
else:

@ -39,7 +39,7 @@ if __name__ == "__main__":
# set color/nocolor for display messages
install.setPrintNoColor(options)
# init variables
install.setProxyNtp(options.proxy,options.ntp)
install.setProxyNtpHostname(options.proxy,options.ntp,options.hostname)
if options.l:
if not install.setLang(options.l):
sys.exit(1)

Loading…
Cancel
Save