projects
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add config file support for the adm5120 switch
[openwrt.git]
/
package
/
admswconfig
/
files
/
admswswitch.sh
1
#!/bin/sh
2
# Copyright (C) 2006 OpenWrt.org
3
4
setup_switch_vlan() {
5
config_get ports "$CONFIG_SECTION" "eth$1"
6
admswconfig eth$1 ${ports}c
7
}
8
9
setup_switch() {
10
config_cb() {
11
case "$1" in
12
switch)
13
option_cb() {
14
case "$1" in
15
eth*) setup_switch_vlan "${1##eth}";;
16
esac
17
}
18
;;
19
*)
20
option_cb() { return 0; }
21
;;
22
esac
23
}
24
config_load network
25
}