From: Felix Fietkau Date: Fri, 23 Sep 2005 18:54:36 +0000 (+0000) Subject: add support for applying network settings X-Git-Tag: whiterussian_rc4~177 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=db882da0c4bbc3493bc07a7c0dabc9a221fd6661;p=openwrt%2Fsvn-archive%2Fopenwrt.git add support for applying network settings SVN-Revision: 1982 --- 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 index 0000000000..1619c35815 --- /dev/null +++ b/openwrt/package/webif/files/usr/lib/webif/apply-network.sh @@ -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 +} diff --git a/openwrt/package/webif/files/usr/lib/webif/apply.sh b/openwrt/package/webif/files/usr/lib/webif/apply.sh index cafa9bc764..f7f1f17ade 100644 --- a/openwrt/package/webif/files/usr/lib/webif/apply.sh +++ b/openwrt/package/webif/files/usr/lib/webif/apply.sh @@ -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-*