2 # Copyright (C) 2006 OpenWrt.org
8 config_get
"$1" "$2" "$3"
11 1|on|enabled
) eval "$1=1";;
12 0|off|disabled
) eval "$1=0";;
13 *) eval "$1=${4:-0}";;
18 config_get TYPE
"$CONFIG_SECTION" TYPE
21 append DEVICES
"$CONFIG_SECTION"
24 config_get device
"$CONFIG_SECTION" device
25 config_get vifs
"$device" vifs
26 append vifs
"$CONFIG_SECTION"
27 config_set
"$device" vifs
"$vifs"
35 for device
in $DEVICES; do (
36 config_get iftype
"$device" type
37 eval "type setup_$iftype" 2>/dev
/null
>/dev
/null
&& {
38 eval "scan_$iftype '$device'"
39 eval "setup_$iftype '$device'" && {
40 # TODO: set up network settings
42 } ||
echo "$device($iftype): Setup failed" || true
43 } ||
echo "$device($iftype): Interface type not supported"
This page took 0.040096 seconds and 5 git commands to generate.