From: nbd Date: Wed, 10 Sep 2014 12:56:19 +0000 (+0000) Subject: procd: allow adding empty strings to arrays X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=commitdiff_plain;h=85fabd68cb08a20be96f0a73d5862133bf9d5790 procd: allow adding empty strings to arrays Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42456 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index d71c3cfc0a..e4e75edb2e 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -75,7 +75,7 @@ _procd_close_service() { } _procd_add_array_data() { - while [ -n "$1" ]; do + while [ "$#" -gt 0 ]; do json_add_string "" "$1" shift done