2 [ $# = 0 ] && { echo " $0 <group>"; exit; }
5 debug
"### ifup $type ###"
7 if_proto
=$
(nvram get
${type}_proto
)
11 if=$
(nvram get
${type}_ifname
)
12 if [ "${if%%[0-9]}" = "ppp" ]; then
13 if=$
(nvram get
${type}_device
)
15 [ "$if_proto" = "pppoe" ] && exit
18 if_valid
"$if" ||
exit
21 mac
=$
(nvram get
${type}_hwaddr
)
22 $DEBUG ifconfig
$if down
2>&-
24 if [ "${if%%[0-9]}" = "br" ]; then
25 stp
=$
(nvram get
${type}_stp
)
26 $DEBUG brctl delbr
$if 2>&-
27 $DEBUG brctl addbr
$if
28 $DEBUG brctl setfd
$if 0
29 $DEBUG brctl stp
$if ${stp:-0}
31 for sif
in $
(nvram get
${type}_ifnames
); do
32 if_valid
$sif ||
continue
33 #${mac:+$DEBUG ifconfig $sif down hw ether $mac}
34 $DEBUG ifconfig
$sif 0.0.0.0 up
35 $DEBUG brctl addif
$if $sif
36 $DEBUG ifconfig
$sif allmulti
39 ${mac:+$DEBUG ifconfig $if down hw ether $mac}
42 do_ifup
$if_proto $type