#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
-[ $# = 0 ] && { echo " $0 <group>"; exit; }
. /etc/functions.sh
+[ $# = 0 ] && { echo " $0 <group>"; exit; }
+[ "x$1" = "x-a" ] && {
+ config_cb() {
+ [ interface != "$1" -o -z "$2" ] || eval "$0 $2"
+ }
+ config_load network
+ exit
+}
include /lib/network
scan_interfaces
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="$cfg" DEVICE="$iface" PROTO=static /sbin/hotplug-call "iface" &
}
# call interface stop handler