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