diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2009-12-19 08:03:35 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-12-19 08:03:35 +0000 |
commit | 2c0a71172d06a9d1e737c775fc40c3989e959902 (patch) | |
tree | c43168c15b7e1fe913cc6b972d558e20ba02f5ed /init.d/network.in | |
parent | cbafcd078df7a9f48abba949f312625e0d68fb43 (diff) |
default route commands on Linux now require gw or via (iproute2).
Diffstat (limited to 'init.d/network.in')
-rw-r--r-- | init.d/network.in | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/init.d/network.in b/init.d/network.in index 259fb31c..655fc173 100644 --- a/init.d/network.in +++ b/init.d/network.in @@ -253,16 +253,11 @@ start() if [ -n "$defaultroute" ]; then ebegin "Setting default route $defaultroute" - if [ "$RC_UNAME" = Linux -a \ - "${defaultroute#dev }" = "$defaultroute" ]; then - route add default gw $defaultroute - else - route add default $defaultroute - fi + route add default $defaultroute eend $? elif [ -n "$defaultiproute" ]; then ebegin "Setting default route $defaultiproute" - ip route add default via $defaultiproute + ip route add default $defaultiproute eend $? fi @@ -270,9 +265,6 @@ start() ebegin "Setting default route $defaultroute6" if [ "$RC_UNAME" = Linux ]; then routecmd="route -A inet6 add" - if [ "${defaultroute6#dev }" = "$defaultroute6" ]; then - routecmd="$routecmd gw" - fi else routecmd="route -inet6 add" fi @@ -280,7 +272,7 @@ start() eend $? elif [ -n "$defaultiproute6" ]; then ebegin "Setting default route $defaultiproute6" - ip route add default via $defaultiproute6 + ip -f inet6 route add default $defaultiproute6 eend $? fi |