[package] firewall: clean up description (#7875)
[openwrt.git] / package / base-files / files / etc / functions.sh
index a788c4c..d5ffc13 100755 (executable)
@@ -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"
@@ -263,7 +264,7 @@ jffs2_mark_erase() {
        echo -e "\xde\xad\xc0\xde" | mtd -qq write - "$1"
 }
 
-uci_apply_defaults() {(
+uci_apply_defaults() {
        cd /etc/uci-defaults || return 0
        files="$(ls)"
        [ -z "$files" ] && return 0
@@ -272,6 +273,6 @@ uci_apply_defaults() {(
                ( . "./$(basename $file)" ) && rm -f "$file"
        done
        uci commit
-)}
+}
 
 [ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
This page took 0.025711 seconds and 4 git commands to generate.