You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
456 B
29 lines
456 B
17 years ago
|
#!/bin/sh
|
||
|
# Copyright (C) 2006 OpenWrt.org
|
||
|
|
||
|
setup_switch_vlan() {
|
||
|
config_get ports "$CONFIG_SECTION" "eth$1"
|
||
17 years ago
|
ports=`echo "$ports"| sed s/" "/""/g`
|
||
14 years ago
|
ifconfig eth$1 down
|
||
17 years ago
|
admswconfig eth$1 ${ports}c
|
||
14 years ago
|
ifconfig eth$1 up
|
||
17 years ago
|
}
|
||
|
|
||
|
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
|
||
|
}
|