diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base | |
download | trunk-36060-27b76ab0671089c47506615a796a261e993896a7.tar.gz trunk-36060-27b76ab0671089c47506615a796a261e993896a7.tar.bz2 trunk-36060-27b76ab0671089c47506615a796a261e993896a7.zip |
Diffstat (limited to 'package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base')
-rw-r--r-- | package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base b/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base new file mode 100644 index 0000000..984d7ee --- /dev/null +++ b/package/admswconfig/files/.svn/text-base/admswswitch.sh.svn-base @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org + +setup_switch_vlan() { + config_get ports "$CONFIG_SECTION" "eth$1" + ports=`echo "$ports"| sed s/" "/""/g` + ifconfig eth$1 down + admswconfig eth$1 ${ports}c + ifconfig eth$1 up +} + +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 +} |