4 [ -f /proc/net/wl0 ] && {
5 lsmod | grep wlcompat >&- || insmod wlcompat
7 iwconfig "$INTERFACE" 2>&- | grep -v 'no wireless' >&- && {
10 [ -d /proc/switch ] || {
12 insmod switch-robo || insmod switch-adm
14 if="$(echo "$INTERFACE" | sed s,eth,et,)"
15 ifconfig "$INTERFACE" up 2>&- >&-
16 [ -d "/proc/switch/$INTERFACE" ] || return 0
17 echo "1" > "/proc/switch/$INTERFACE/reset"
18 echo "1" > "/proc/switch/$INTERFACE/enable_vlan"
19 for vlan in $(seq 0 15); do
20 eval "hwname=\"\${vlan${vlan}hwname}\""
21 [ "$hwname" = "$if" ] && {
22 eval "vports=\"\${vlan${vlan}ports}\""
23 [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports"
24 $DEBUG vconfig add "$INTERFACE" "$vlan"
31 case "${INTERFACE%%[0-9]*}" in
38 add|register) do_register;;