From 30e87aab88d7cbb8ba3f77e877a4014e236bc3a7 Mon Sep 17 00:00:00 2001
From: mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Sun, 28 Mar 2004 04:15:26 +0000
Subject: deal with static routes

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 root/etc/networking.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/root/etc/networking.sh b/root/etc/networking.sh
index b857a86c0..c1e6742e3 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
-- 
cgit v1.2.3