2005-11-07 01:12:51 +00:00
|
|
|
#!/bin/sh
|
2006-06-27 00:36:13 +00:00
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
|
2005-07-15 16:56:23 +00:00
|
|
|
[ $# = 0 ] && { echo " $0 <group>"; exit; }
|
2005-02-06 00:58:10 +00:00
|
|
|
. /etc/functions.sh
|
2006-04-05 02:09:22 +00:00
|
|
|
. /etc/config/network
|
2005-11-07 01:12:51 +00:00
|
|
|
|
2005-07-15 16:56:23 +00:00
|
|
|
debug "### ifdown $type ###"
|
2005-11-19 03:17:20 +00:00
|
|
|
type=$1
|
2005-11-07 01:12:51 +00:00
|
|
|
|
2006-04-05 02:09:22 +00:00
|
|
|
eval "if_proto=\"\${${type}_proto}\""
|
|
|
|
eval "if=\"\${${type}_ifname}\""
|
|
|
|
[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\""
|
2005-11-19 03:17:20 +00:00
|
|
|
|
|
|
|
case "$if_proto" in
|
|
|
|
pppoa) hotplug_dev unregister atm0; exit 0 ;;
|
2005-11-19 14:53:21 +00:00
|
|
|
""|none) exit 0;;
|
2005-11-07 01:12:51 +00:00
|
|
|
esac
|
|
|
|
|
2005-11-19 03:17:20 +00:00
|
|
|
hotplug_dev unregister "$if"
|