Fix work with net options.

master
Mike Hiretsky 12 years ago
parent fdfe7307d8
commit 379711b74d

@ -308,6 +308,7 @@ class install_cmd(share_cmd):
valuename=_("frame buffer resolution"),
example="1024x768")
if values.ip:
self.logicObj.clVars.Set('os_install_net_settings','',True)
for ipaddr in values.ip:
if not re.match("^(\w+:)?%s$"%iputils.IP_ADDR_NET,ipaddr):
self.optobj.error(self.errorWithExample.format(
@ -316,6 +317,7 @@ class install_cmd(share_cmd):
value=ipaddr,
example="eth0:192.168.0.21/16"))
if not values.dns is None:
self.logicObj.clVars.Set('os_install_net_settings','',True)
if not re.match("(^{0}(,{0})*|)$".format(iputils.IP_ADDR),
values.dns):
self.optobj.error(self.errorWithExample.format(
@ -324,6 +326,7 @@ class install_cmd(share_cmd):
value=values.dns,
example="8.8.8.8"))
if values.route:
self.logicObj.clVars.Set('os_install_net_settings','',True)
for route in values.route:
if not re.match("^({net}|default):(({ipaddr})?"
"(:\w+(:{ipaddr})?)?)?$".format(
@ -334,6 +337,8 @@ class install_cmd(share_cmd):
value=route,
example="default:192.168.1.1"))
# if system installation
if values.dhcp:
self.logicObj.clVars.Set('os_install_net_settings','',True)
if values.scheduler:
if not values.scheduler in \
self.logicObj.clVars.Get('os_kernel_schedulers'):

Loading…
Cancel
Save