add support for applying network settings
authorFelix Fietkau <nbd@openwrt.org>
Fri, 23 Sep 2005 18:54:36 +0000 (18:54 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 23 Sep 2005 18:54:36 +0000 (18:54 +0000)
SVN-Revision: 1982

openwrt/package/webif/files/usr/lib/webif/apply-network.sh [new file with mode: 0644]
openwrt/package/webif/files/usr/lib/webif/apply.sh

diff --git a/openwrt/package/webif/files/usr/lib/webif/apply-network.sh b/openwrt/package/webif/files/usr/lib/webif/apply-network.sh
new file mode 100644 (file)
index 0000000..1619c35
--- /dev/null
@@ -0,0 +1,10 @@
+echo Reloading networking settings...
+grep '^wan_' config-network >&- 2>&- && {
+       ifdown wan
+       ifup wan
+}
+
+grep '^lan_' config-network >&- 2>&- && {
+       ifdown lan
+       ifup lan
+}
index cafa9bc76470d68d6450487b591e58bf276ac890..f7f1f17ade214aa95b488b87cabd36e3b6abd7ca 100644 (file)
@@ -10,4 +10,5 @@ for config in config-*; do
        name="/usr/lib/webif/apply-${config#config-}.sh"
        [ -f "$name" ] && sh $name &
 done
+sleep 2
 rm -f config-*