[package] base-files: dispatch ifdown events for proto=none interfaces and fix a...
[openwrt-10.03/.git] / package / base-files / files / sbin / ifdown
index 883f8ec42893bc8c3fb70286a6674f1430deeeac..8de414d8b6dd96ad349b52ffe97e5a398f562fc8 100755 (executable)
@@ -22,8 +22,8 @@ config_get proto "$cfg" proto
 [ -z "$proto" ] && { echo "interface not found."; exit; }
 
 config_get iface "$cfg" device
-[ "static" = "$proto" ] && {
-       env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
+[ "static" = "$proto" -o "none" = "$proto" ] && {
+       env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$iface" PROTO="$proto" /sbin/hotplug-call "iface"
 }
 
 # call interface stop handler