From: Mike Baker Date: Sun, 28 Mar 2004 04:15:26 +0000 (+0000) Subject: deal with static routes X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=2cff23d841e8c2c9c8158ed1fdc8f60ab2360eea deal with static routes SVN-Revision: 8 --- diff --git a/root/etc/networking.sh b/root/etc/networking.sh index b857a86c06..c1e6742e36 100755 --- a/root/etc/networking.sh +++ b/root/etc/networking.sh @@ -161,3 +161,12 @@ lan_proto="static" configure lan configure wifi configure wan + +for route in $(nvram_get static_route); do { + ip=${route%%:*} route=${route#*:} + netmask=${route%%:*} route=${route#*:} + gateway=${route%%:*} route=${route#*:} + metric=${route%%:*} route=${route#*:} + if=${route%%:*} + $DEBUG route add -net $ip netmask $netmask gw $gateway metric $metric dev $if +} done