diff options
author | Travis Kemen <thepeople@openwrt.org> | 2008-02-27 15:59:15 +0000 |
---|---|---|
committer | Travis Kemen <thepeople@openwrt.org> | 2008-02-27 15:59:15 +0000 |
commit | bff39ee8b8a2584edf5eec27cae75a94cde08244 (patch) | |
tree | bcc39f143f69dc74034a976b3ea83fd67c0dc4ae /package/admswconfig/files/admswswitch.sh | |
parent | 1e6f69faa5ac6e09dcc34f8c25ff2072b7fcdd37 (diff) | |
download | upstream-bff39ee8b8a2584edf5eec27cae75a94cde08244.tar.gz upstream-bff39ee8b8a2584edf5eec27cae75a94cde08244.tar.bz2 upstream-bff39ee8b8a2584edf5eec27cae75a94cde08244.zip |
add config file support for the adm5120 switch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10529 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/admswconfig/files/admswswitch.sh')
-rw-r--r-- | package/admswconfig/files/admswswitch.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/package/admswconfig/files/admswswitch.sh b/package/admswconfig/files/admswswitch.sh new file mode 100644 index 0000000000..c5898d5a39 --- /dev/null +++ b/package/admswconfig/files/admswswitch.sh @@ -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 +} |