projects
/
openwrt
/
staging
/
ansuel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dbaccf
)
base-files: port functions.sh to new config_get
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 7 Aug 2009 00:07:46 +0000
(
00:07
+0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 7 Aug 2009 00:07:46 +0000
(
00:07
+0000)
Signed-off-by: Malte S. Stretz <mss@apache.org>
SVN-Revision: 17156
package/base-files/files/etc/functions.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/functions.sh
b/package/base-files/files/etc/functions.sh
index efa378f0061db4b526efb179d7994a85659d8536..eb7faac1fe4dd607307ed95e5ebb848e35bbd282 100755
(executable)
--- a/
package/base-files/files/etc/functions.sh
+++ b/
package/base-files/files/etc/functions.sh
@@
-91,8
+91,8
@@
list() {
local value="$*"
local len
- config_get len "$CONFIG_SECTION" "${varname}_LENGTH"
- len=
"$((${len:-0} + 1))"
+ config_get len "$CONFIG_SECTION" "${varname}_LENGTH"
0
+ len=
$(($len + 1))
config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"