Allow ip to add the default route.

Fixes #211.
This commit is contained in:
William Hubbs 2009-12-10 22:08:51 +00:00 committed by Roy Marples
parent 5b3e5edda2
commit 12af86395f
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,9 @@
# On the other hand, ip (iproute2) is quite powerful and is also supported
#ip_eth0="192.168.0.10/24; 192.168.10.10/24"
# You can also use ip to add the default route.
#defaultiproute="192.168.0.1"
# ip doesn't handle MTU like ifconfig, but we can do it like so
#ifup_eth0="ip link set \$int mtu 1500"

View File

@ -255,6 +255,10 @@ start()
route add default $defaultroute
fi
eend $?
elif [ -n "$defaultiproute" ]; then
ebegin "Setting default route $defauliptroute"
ip route add default via $defaultiproute
eend $?
fi
return 0