X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e2ed54aba7ef3a4553f96b44a900b5dbfde8b96e..6e3fb9dc77a21ac67d7ea90d0cf66a2dac84feff:/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 828e37e40..fa0ba0427 100755 --- a/package/base-files/files/etc/functions.sh +++ b/package/base-files/files/etc/functions.sh @@ -2,8 +2,13 @@ # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 Fokus Fraunhofer -alias debug=${DEBUG:-:} -alias mount='busybox mount' + +debug () { + ${DEBUG:-:} "$@" +} +mount() { + busybox mount "$@" +} # newline N=" @@ -91,8 +96,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" @@ -134,22 +139,25 @@ config_clear() { done } +# config_get