From 6d77d33472d3fd60102e782ed0932dfac06f149d Mon Sep 17 00:00:00 2001 From: Mike Baker Date: Sun, 28 Mar 2004 04:15:26 +0000 Subject: [PATCH] deal with static routes SVN-Revision: 8 --- root/etc/networking.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/root/etc/networking.sh b/root/etc/networking.sh index b857a86c062..c1e6742e363 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