blob: 32a60a82bf2f191a6564ae0773aefcb95d649d30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
setup_switch_vlan() {
config_get ports "$CONFIG_SECTION" "eth$1"
ports=`echo "$ports"| sed s/" "/""/g`
admswconfig eth$1 ${ports}c
}
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
}
|