dnsmasq: fix ismounted check
authorOldřich Jedlička <oldium.pro@gmail.com>
Sun, 7 Nov 2021 20:56:12 +0000 (21:56 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 23 Nov 2021 14:57:52 +0000 (14:57 +0000)
Fix the return value, shell return codes should be 0 to indicate success
(i.e. mount point found), 1 should be failure (i.e. mount point not-found).

Fixes: ac4e8aa ("dnsmasq: fix more dnsmasq jail issues")
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
package/network/services/dnsmasq/files/dnsmasq.init

index 1e53f8f2c1812a838e03eb69d458273e062d22b0..09dce0a78d5abd9702da7d4bd66dcd08586007b9 100755 (executable)
@@ -197,12 +197,12 @@ ismounted() {
        for dirname in $EXTRA_MOUNT ; do
                case "$filename" in
                        "${dirname}/"* | "${dirname}" )
-                               return 1
+                               return 0
                                ;;
                esac
        done
 
-       return 0
+       return 1
 }
 
 append_addnhosts() {