fix bogus "interface not found" errors in ifup -a (#1580)
[openwrt/svn-archive/archive.git] / package / base-files / files / sbin / ifdown
index 540c69f169115efe2981aa4b050ff1e9f7f6ca5a..8c36a25b48d2bfc4ec8c494bf39f1d7fea820a94 100755 (executable)
@@ -5,7 +5,7 @@
 [ $# = 0 ] && { echo "  $0 <group>"; exit; }
 [ "x$1" = "x-a" ] && {
        config_cb() {
-               [ -z "$2" ] || eval "$0 $2"
+               [ interface != "$1" -o -z "$2" ] || eval "$0 $2"
        }
        config_load network
        exit
@@ -21,7 +21,7 @@ config_get proto "$cfg" proto
 
 config_get iface "$cfg" device
 [ "$proto" = "static" ] && {
-       env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug "iface" &
+       env -i ACTION="ifdown" INTERFACE="$config" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
 }
 
 # call interface stop handler