From: Felix Fietkau Date: Wed, 10 Sep 2014 12:56:19 +0000 (+0000) Subject: procd: allow adding empty strings to arrays X-Git-Tag: v19.07.0-rc1~16675 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2dabf3a775f21a1a66b9505e63ee79056b237ccf;p=openwrt%2Fstaging%2Fhauke.git procd: allow adding empty strings to arrays Signed-off-by: Felix Fietkau SVN-Revision: 42456 --- 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