procd: allow adding empty strings to arrays
authorFelix Fietkau <nbd@openwrt.org>
Wed, 10 Sep 2014 12:56:19 +0000 (12:56 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 10 Sep 2014 12:56:19 +0000 (12:56 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 42456

package/system/procd/files/procd.sh

index d71c3cfc0a472f593a5731d697f9e584a211c190..e4e75edb2e13174afa178d12f08bf92576653aac 100644 (file)
@@ -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