mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
add config file support for the adm5120 switch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10529 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
25
package/admswconfig/files/admswswitch.sh
Normal file
25
package/admswconfig/files/admswswitch.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
|
||||
setup_switch_vlan() {
|
||||
config_get ports "$CONFIG_SECTION" "eth$1"
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user