mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-16 07:24:38 +02:00
ec3c566c7c
Signed-off-by: Alexey Torkhov <atorkhov@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25173 3c298f89-4303-0410-b956-a3cf2f4a3e73
29 lines
456 B
Bash
29 lines
456 B
Bash
#!/bin/sh
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
setup_switch_vlan() {
|
|
config_get ports "$CONFIG_SECTION" "eth$1"
|
|
ports=`echo "$ports"| sed s/" "/""/g`
|
|
ifconfig eth$1 down
|
|
admswconfig eth$1 ${ports}c
|
|
ifconfig eth$1 up
|
|
}
|
|
|
|
setup_switch() {
|
|
config_cb() {
|
|
case "$1" in
|
|
switch)
|
|
option_cb() {
|
|
case "$1" in
|
|
eth*) setup_switch_vlan "${1##eth}";;
|
|
esac
|
|
}
|
|
;;
|
|
*)
|
|
option_cb() { return 0; }
|
|
;;
|
|
esac
|
|
}
|
|
config_load network
|
|
}
|