aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-19 10:10:45 -0400
committerDave Reisner <d@falconindy.com>2011-06-19 10:10:45 -0400
commit824567cb23ed0bab4ed4568be139ee0c75d7598d (patch)
tree55a57ef5a1da578f9c81dcd7a9dbac8e9b6065b2 /network
parentfe48fab2c2c35ccbfa3eec436d40739bc4b486da (diff)
downloadinitscripts-824567cb23ed0bab4ed4568be139ee0c75d7598d.tar.xz
network: don't enforce check for netmask or gateway
4cad51425325 removed the necessity for defining gateway, but we still continued to check for it. Remove this check, as well as the check for netmask. When not supplied, netmask will default to /24. Signed-off-by: Dave Reisner <d@falconindy.com>
Diffstat (limited to 'network')
-rwxr-xr-xnetwork8
1 files changed, 1 insertions, 7 deletions
diff --git a/network b/network
index 38ada9a..0177c04 100755
--- a/network
+++ b/network
@@ -26,13 +26,7 @@ network_up() {
ip link set dev $interface up || return 1
if [[ $address ]]; then
- for var in netmask gateway; do
- if [[ -z ${!var} ]]; then
- printf "${C_FAIL}Error: static address defined without $var!\n"
- return 1
- fi
- done
- ip addr add $address/$netmask broadcast ${broadcast:-+} dev $interface || return 1
+ ip addr add $address/${netmask:-24} broadcast ${broadcast:-+} dev $interface || return 1
[[ $gateway ]] && { ip route add default via $gateway || return 1; }
else
dhcpcd $DHCPCD_ARGS $interface || return 1