remove more nvram references
[openwrt.git] / target / linux / package / base-files / files / brcm-2.6 / etc / hotplug.d / net / 09-net
1 #!/bin/sh
2 setup_eth()
3 {
4 [ -d /proc/switch ] || {
5 insmod switch-core
6 insmod switch-robo || insmod switch-adm
7 }
8 if="$(echo "$INTERFACE" | sed s,eth,et,)"
9 ifconfig "$INTERFACE" up 2>&- >&-
10 [ -d "/proc/switch/$INTERFACE" ] || return 0
11 echo "1" > "/proc/switch/$INTERFACE/reset"
12 echo "1" > "/proc/switch/$INTERFACE/enable_vlan"
13 for vlan in $(seq 0 15); do
14 eval "hwname=\"\${vlan${vlan}hwname}\""
15 [ "$hwname" = "$if" ] && {
16 eval "vports=\"\${vlan${vlan}ports}\""
17 [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports"
18 $DEBUG vconfig add "$INTERFACE" "$vlan"
19 }
20 done
21 }
22
23 do_register()
24 {
25 case "${INTERFACE%%[0-9]*}" in
26 eth) setup_eth;;
27 esac
28 }
29
30
31 case "$ACTION" in
32 add|register) do_register;;
33 esac
This page took 0.039841 seconds and 5 git commands to generate.