X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/0a7ebe9ab1187e5ef18994439f2b83bbc06a7414..8600b97ee65ecd97461508bf0e67de06707a2e59:/package/switch/files/switch.sh diff --git a/package/switch/files/switch.sh b/package/switch/files/switch.sh index f0bd8ce60..2563d410e 100644 --- a/package/switch/files/switch.sh +++ b/package/switch/files/switch.sh @@ -11,10 +11,17 @@ setup_switch_hw() { local proc="/proc/switch/$dev" [ -d "$proc" ] && { + ifconfig "$dev" up echo "$reset" > "$proc/reset" echo "$evlan" > "$proc/enable_vlan" [ -f "$proc/enable" ] && echo "$enable" > "$proc/enable" } + + local vlan + for vlan in `seq 0 15`; do + proc="/proc/switch/$dev/vlan/$vlan/ports" + [ -f "$proc" ] && echo "" > "$proc" + done } setup_switch_vlan() {