2 # Copyright (C) 2006 OpenWrt.org
3 # Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de>
5 alias debug
=${DEBUG:-:}
14 env
-i ACTION
=$1 INTERFACE
=$2 /sbin
/hotplug net
22 eval "$var=\"\${$var:+\${$var}${value:+$sep}}$value\""
26 config_cb
() { return 0; }
27 option_cb
() { return 0; }
36 name
="${name:-cfg${_C}}"
37 config_cb
"$cfgtype" "$name"
38 CONFIG_SECTION
="$name"
39 eval CONFIG_
${CONFIG_SECTION}_TYPE
="$cfgtype"
43 local varname
="$1"; shift
45 eval CONFIG_
${CONFIG_SECTION}_
${varname}="$*"
46 option_cb
"$varname" "$*"
55 [ "$OLD" -a "$NEW" ] ||
return
56 for oldvar
in `set | grep ^CONFIG_${OLD}_ | \
57 sed -e 's/\(.*\)=.*$/\1/'` ; do
58 newvar
="CONFIG_${NEW}_${oldvar##CONFIG_${OLD}_}"
59 eval "$newvar=\${$oldvar}"
63 [ "$CONFIG_SECTION" = "$OLD" ] && CONFIG_SECTION
="$NEW"
67 config_set
"$1" "$2" ""
74 for oldvar
in `set | grep ^CONFIG_${SECTION}_ | \
75 sed -e 's/\(.*\)=.*$/\1/'` ; do
81 local file="/etc/config/$1"
89 ${CONFIG_SECTION:+config_cb}
94 "") eval "echo \"\${CONFIG_${1}_${2}}\"";;
95 *) eval "$1=\"\${CONFIG_${2}_${3}}\"";;
100 eval CONFIG_
${1}_
${2}="$3"
104 sed 's/^[^#]/insmod &/' $
* | ash
2>&- ||
:
110 for file in $
(ls $1/*.sh
2>/dev
/null
); do
116 local PART
="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
119 echo "${PART:+/dev/mtdblock/$PART}"
122 strtok
() { # <string> { <variable> [<separator>] ... }
129 while [ $# -gt 1 ]; do
132 [ "$tmp" = "$val" ] && break
136 eval $1="$tmp"; count
=$
((count
+1))
140 if [ $# -gt 0 -a "$val" ]; then
141 eval $1="$val"; count
=$
((count
+1))
This page took 0.049767 seconds and 5 git commands to generate.