X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/daa59b7513eb66b7c184474ea188fda4dd4a4aee..cbcb7e2471677594c9a54d64a4f73003c75d8245:/package/base-files/files/etc/functions.sh diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh index 61c04953d..d5ffc1353 100755 --- a/package/base-files/files/etc/functions.sh +++ b/package/base-files/files/etc/functions.sh @@ -4,10 +4,10 @@ debug () { - ${DEBUG:-:} + ${DEBUG:-:} "$@" } mount() { - busybox mount + busybox mount "$@" } # newline @@ -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"