2005-11-07 03:12:51 +02:00
|
|
|
#!/bin/sh
|
2005-07-15 19:56:23 +03:00
|
|
|
[ $# = 0 ] && { echo " $0 <group>"; exit; }
|
2005-02-06 02:58:10 +02:00
|
|
|
. /etc/functions.sh
|
2005-11-19 05:17:20 +02:00
|
|
|
. /etc/network.overrides
|
2005-08-25 14:57:56 +03:00
|
|
|
[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network
|
2005-11-07 03:12:51 +02:00
|
|
|
|
2005-07-15 19:56:23 +03:00
|
|
|
debug "### ifdown $type ###"
|
2005-11-19 05:17:20 +02:00
|
|
|
type=$1
|
2005-11-07 03:12:51 +02:00
|
|
|
|
2005-11-19 05:17:20 +02:00
|
|
|
if_proto=$(nvram get ${type}_proto)
|
2005-07-15 19:56:23 +03:00
|
|
|
if=$(nvram get ${type}_ifname)
|
2005-11-19 05:17:20 +02:00
|
|
|
|
|
|
|
case "$if_proto" in
|
|
|
|
pppoa) hotplug_dev unregister atm0; exit 0 ;;
|
2005-11-19 16:53:21 +02:00
|
|
|
""|none) exit 0;;
|
2005-11-07 03:12:51 +02:00
|
|
|
esac
|
|
|
|
|
2005-11-19 05:17:20 +02:00
|
|
|
if [ "${if%%[0-9]}" = "br" ]; then
|
|
|
|
for sif in $(nvram get ${type}_ifnames); do
|
|
|
|
hotplug_dev unregister "$sif"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
hotplug_dev unregister "$if"
|