aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin/ifdown
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-06-16 00:01:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-06-16 00:01:33 +0000
commit4f16e9cc3e2c187d19b24785a55ce30a892efd68 (patch)
tree2f0c604247fa6fd86171a5e3398a4a662f99cb06 /package/base-files/files/sbin/ifdown
parent8e2643a8b517b0ff5030f05020c48fc7bc0e85c2 (diff)
downloadupstream-4f16e9cc3e2c187d19b24785a55ce30a892efd68.tar.gz
upstream-4f16e9cc3e2c187d19b24785a55ce30a892efd68.tar.bz2
upstream-4f16e9cc3e2c187d19b24785a55ce30a892efd68.zip
keep track of the network interface states (stored in uci format in /var/state/network, overlay over /etc/config/network)
SVN-Revision: 7643
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