[scripts] env: colorize git output
[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 ifconfig eth$1 down
8 admswconfig eth$1 ${ports}c
9 ifconfig eth$1 up
10 }
11
12 setup_switch() {
13 config_cb() {
14 case "$1" in
15 switch)
16 option_cb() {
17 case "$1" in
18 eth*) setup_switch_vlan "${1##eth}";;
19 esac
20 }
21 ;;
22 *)
23 option_cb() { return 0; }
24 ;;
25 esac
26 }
27 config_load network
28 }
This page took 0.051643 seconds and 5 git commands to generate.