bug 4.3/950

check net.
	modified:   ri_tk_cmd.py
	modified:   ../operation/configure_network.sh
This commit is contained in:
fling
2011-07-22 12:05:26 +08:00
parent e179d1481a
commit bce90126c1
2 changed files with 5 additions and 9 deletions

View File

@@ -138,11 +138,12 @@ def network_quit():
if not ri_data.Network.hostname:
ri_widget.MessageBox.dict['check_ip_hostname'].show()
ri_widget.Sequence.previous()
elif ri_data.Network.configuration == "static" and \
(not ri_data.Network.ip or \
not ri_data.Network.mask or \
not ri_data.Network.gateway or \
not ri_data.Network.primary_dns) :
(not re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$",ri_data.Network.ip) or \
not re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$",ri_data.Network.mask) or \
not re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$",ri_data.Network.gateway) or \
not re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$",ri_data.Network.primary_dns)):
ri_widget.MessageBox.dict['check_ip_hostname'].show()
ri_widget.Sequence.previous()

View File

@@ -175,11 +175,6 @@ parse_arg ()
fi
if [ "$TYPE" == "static" ];then
if [ -z "$DOMAINNAME" ];then
err "static configure network, DOMAINNAME can't be empty"
return 1
fi
if [ -z "$IP" ];then
err "static configure network, IP address can't be empty"
return 1