projects
/
openwrt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix a bug causing the init script to fail and incorrect number of lan ports
[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
ports=`echo "$ports"| sed s/" "/""/g`
7
admswconfig eth$1 ${ports}c
8
}
9
10
setup_switch() {
11
config_cb() {
12
case "$1" in
13
switch)
14
option_cb() {
15
case "$1" in
16
eth*) setup_switch_vlan "${1##eth}";;
17
esac
18
}
19
;;
20
*)
21
option_cb() { return 0; }
22
;;
23
esac
24
}
25
config_load network
26
}