1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-25 07:41:09 +02:00

base-files: port functions.sh to new config_get

Signed-off-by: Malte S. Stretz <mss@apache.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17156 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2009-08-07 00:07:46 +00:00
parent eb62b765c4
commit d84cebe2b4

View File

@ -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"