summaryrefslogtreecommitdiff
path: root/package/base-files/files/sbin/ifdown
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-16 00:01:33 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-16 00:01:33 +0000
commit46da1409881bee5a1b11691d286f773f38374bd9 (patch)
tree90b0a4b1f403fbf8f0c1576ca1ea25d8fe4af8ee /package/base-files/files/sbin/ifdown
parent482f2d1ecc524fd6aff972cf29f5252e2f73f905 (diff)
keep track of the network interface states (stored in uci format in /var/state/network, overlay over /etc/config/network)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7643 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/sbin/ifdown')
-rwxr-xr-xpackage/base-files/files/sbin/ifdown6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/base-files/files/sbin/ifdown b/package/base-files/files/sbin/ifdown
index 8ec568ff6b..f8ce81bcbd 100755
--- a/package/base-files/files/sbin/ifdown
+++ b/package/base-files/files/sbin/ifdown
@@ -10,6 +10,12 @@
config_load network
exit
}
+
+# remove the interface's network state
+FILE=/var/state/network.$$
+grep -v "^config_set '$1' " /var/state/network > "$FILE"
+mv "$FILE" /var/state/network
+
include /lib/network
scan_interfaces