2 # Copyright (C) 2006-2009 OpenWrt.org
6 local enable reset evlan
8 config_get_bool
enable "$dev" enable 1
9 config_get_bool evlan
"$dev" enable_vlan
1
10 config_get_bool
reset "$dev" reset 1
12 local proc
="/proc/switch/$dev"
14 echo "$reset" > "$proc/reset"
15 echo "$evlan" > "$proc/enable_vlan"
16 echo "$enable" > "$proc/enable"
24 config_get dev
"$s" device
25 config_get vlan
"$s" vlan
26 config_get ports
"$s" ports
28 [ -n "$dev" ] && [ -n "$vlan" ] && {
29 local proc
="/proc/switch/$dev/vlan/$vlan/ports"
30 [ -f "$proc" ] && echo "$ports" > "$proc"
36 config_foreach setup_switch_hw switch
37 config_foreach setup_switch_vlan switch_vlan