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 "export -n -- \"$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 export -n "CONFIG_${CONFIG_SECTION}_TYPE=$cfgtype"
43 local varname
="$1"; shift
46 export -n "CONFIG_${CONFIG_SECTION}_${varname}=$value"
47 option_cb
"$varname" "$*"
56 [ "$OLD" -a "$NEW" ] ||
return
57 for oldvar
in `set | grep ^CONFIG_${OLD}_ | \
58 sed -e 's/\(.*\)=.*$/\1/'` ; do
59 newvar
="CONFIG_${NEW}_${oldvar##CONFIG_${OLD}_}"
60 eval "export -n \"$newvar=\${$oldvar}\""
64 [ "$CONFIG_SECTION" = "$OLD" ] && CONFIG_SECTION
="$NEW"
68 config_set
"$1" "$2" ""
75 for oldvar
in `set | grep ^CONFIG_${SECTION}_ | \
76 sed -e 's/\(.*\)=.*$/\1/'` ; do
82 local file="/etc/config/$1"
90 ${CONFIG_SECTION:+config_cb}
95 "") eval "echo \"\${CONFIG_${1}_${2}}\"";;
96 *) eval "export -n -- \"$1=\${CONFIG_${2}_${3}}\"";;
104 export -n "CONFIG_${section}_${option}=$value"
109 sed 's/^[^#]/insmod &/' $
* | ash
2>&- ||
:
115 for file in $
(ls $1/*.sh
2>/dev
/null
); do
121 local PART
="$(grep "\"$1\"" /proc/mtd | awk -F: '{print $1}')"
124 echo "${PART:+/dev/mtdblock/$PART}"
127 strtok
() { # <string> { <variable> [<separator>] ... }
134 while [ $# -gt 1 ]; do
137 [ "$tmp" = "$val" ] && break
141 export -n "$1=$tmp"; count
=$
((count
+1))
145 if [ $# -gt 0 -a "$val" ]; then
146 export -n "$1=$val"; count
=$
((count
+1))
This page took 0.051064 seconds and 5 git commands to generate.