xinetd: fix syntax violation 16318/head
authorFritz D. Ansel <fdansel@yandex.ru>
Thu, 12 Aug 2021 12:05:09 +0000 (14:05 +0200)
committerFritz D. Ansel <fdansel@yandex.ru>
Thu, 12 Aug 2021 12:05:09 +0000 (14:05 +0200)
see https://github.com/openwrt/packages/pull/16318#discussion_r687481110

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
net/xinetd/files/xinetd.init

index 699d6fa5830a41a97a9a2425e93ab364db3d6196..9e3872fce28a0d14653243d64fb6f131c10eb927 100644 (file)
@@ -71,7 +71,7 @@ config_cb() {
                        local value="$2"
 
                        # write out last list option if new list starts
-                       if [ "$ListName" != "" -a "$ListName" != "$name" ]; then
+                       if [ -n "$ListName" ] && [ "$ListName" != "$name" ]; then
 
                                echo -e "\t$ListName = $ListVals" >> $GENERATED_CONF_FILE