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