2 # Copyright (C) 2006 OpenWrt.org
3 # Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de>
5 alias debug
=${DEBUG:-:}
15 ifconfig
"$1" >&- 2>&- ||
16 [ "${1%%[0-9]}" = "br" ] ||
17 { debug
"# missing interface '$1' ignored"; false
; }
21 env
-i ACTION
=$1 INTERFACE
=$2 /sbin
/hotplug net
28 eval "export ${var}=\"\${${var}:+\${${var}}${value:+$sep}}\$value\""
45 name
="${name:-cfg${_C}}"
46 config_cb
"$cfgtype" "$name"
47 export CONFIG_SECTION
="$name"
48 export CONFIG_
${CONFIG_SECTION}_TYPE
="$cfgtype"
52 local varname
="$1"; shift
53 export CONFIG_
${CONFIG_SECTION}_
${varname}="$*"
54 option_cb
"$varname" "$*"
63 [ -z "$OLD" -o -z "$NEW" ] && return
64 for oldsetting
in `set | grep ^CONFIG_${OLD}_ | \
65 sed -e 's/\(.*\)=.*$/\1/'` ; do
66 newvar
="CONFIG_${NEW}_${oldsetting##CONFIG_${OLD}_}"
67 eval "${newvar}=\${$oldsetting}"
70 [ "$CONFIG_SECTION" = "$OLD" ] && CONFIG_SECTION
="$NEW"
74 config_set
"$1" "$2" ""
78 [ -z "$CONFIG_SECTION" ] && return
79 for oldsetting
in `set | grep ^CONFIG_${CONFIG_SECTION}_ | \
80 sed -e 's/\(.*\)=.*$/\1/'` ; do
89 [ \
! -e "$1" -a -e "/etc/config/$1" ] && {
93 CONFIG_FILENAME
="$DIR$1"
96 ${CD:+cd -} >/dev
/null
97 ${CONFIG_SECTION:+config_cb}
102 "") eval "echo \"\${CONFIG_${1}_${2}}\"";;
103 *) eval "$1=\"\${CONFIG_${2}_${3}}\"";;
108 export CONFIG_
${1}_${2}="${3}"
112 sed 's/^[^#]/insmod &/' $* | ash 2>&- || :
116 for file in $(ls $1/*.sh 2>/dev/null); do
This page took 0.048123 seconds and 5 git commands to generate.