X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=package%2Fbase-files%2Ffiles%2Fetc%2Ffunctions.sh;h=d5ffc13535df8318100857242ec406dea301af62;hb=63991ba875e46f40324352a5317d144465567833;hp=fa0ba0427bea8b5ebd9c0d59907c58722a640515;hpb=6616951c15bef73a09da4cbbe2eb956e74e8b164;p=openwrt%2Fstaging%2Fmkresin.git diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh index fa0ba0427b..d5ffc13535 100755 --- a/package/base-files/files/etc/functions.sh +++ b/package/base-files/files/etc/functions.sh @@ -97,6 +97,7 @@ list() { local len config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 0 + [ $len = 0 ] && append CONFIG_LIST_STATE "${CONFIG_SECTION}_${varname}" len=$(($len + 1)) config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value" config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"