[openwrt/openwrt] dnsmasq: fix ismounted check

LEDE Commits lede-commits at lists.infradead.org
Tue Nov 23 06:58:20 PST 2021


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1818157daa538a97bb128d40750bfba6c98d3abe

commit 1818157daa538a97bb128d40750bfba6c98d3abe
Author: Oldřich Jedlička <oldium.pro at gmail.com>
AuthorDate: Sun Nov 7 21:56:12 2021 +0100

    dnsmasq: fix ismounted check
    
    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 at gmail.com>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 1e53f8f2c1..09dce0a78d 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -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() {



More information about the lede-commits mailing list