Revert the network state after stopping and deconfiguring interfaces.
If the network status is reverted at the beginning of ifdown, calls to
config_get might not work in some cases (eg. dhcp over wifi interface).
Signed-off-by: Frédéric Moulins <[EMAIL PROTECTED]>
---
Is there a reason for reverting the network state at the beginning of
ifdown ?
diff --git a/package/base-files/files/sbin/ifdown
b/package/base-files/files/sbin/ifdown
index 1f200fb..9fc61ad 100755
--- a/package/base-files/files/sbin/ifdown
+++ b/package/base-files/files/sbin/ifdown
@@ -11,9 +11,6 @@
exit
}
-# remove the interface's network state
-uci_revert_state network "$1"
-
include /lib/network
scan_interfaces
@@ -64,3 +61,5 @@ done
config_get iftype "$cfg" type
[ "bridge" = "$iftype" ] && brctl delbr "$ifname" >/dev/null 2>/dev/null
+# remove the interface's network state
+uci_revert_state network "$1"
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel