4 for part
in $
(nvram get unused_ifnames
); do
5 [ "$part" = "$INTERFACE" ] && exit 0
7 [ -d /proc
/switch
] ||
{
9 insmod switch-robo || insmod switch-adm
11 if="$(echo "$INTERFACE" | sed s,eth,et,)"
12 ifconfig
"$INTERFACE" up
2>&- >&-
13 [ -d "/proc/switch/$INTERFACE" ] ||
return 0
14 echo "1" > "/proc/switch/$INTERFACE/enable_vlan"
15 for vlan
in $
(seq 0 15); do
16 [ "$(nvram get vlan${vlan}hwname)" = "$if" ] && {
17 vports
="$(nvram get vlan${vlan}ports)"
18 [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports"
19 $DEBUG vconfig add
"$INTERFACE" "$vlan"
26 case "${INTERFACE%%[0-9]*}" in
33 add|register
) do_register
;;