Merge pull request #2384 from davidjb/patch-1
authorDirk Brenken <dev@brenken.org>
Sat, 5 Jan 2019 17:01:22 +0000 (18:01 +0100)
committerGitHub <noreply@github.com>
Sat, 5 Jan 2019 17:01:22 +0000 (18:01 +0100)
luci-app-ddns: check existence of nslookup util rather than making DNS request

applications/luci-app-ddns/luasrc/tools/ddns.lua

index 6f0c7f0952e596f6cce8fb38a8a43c6190aa481b..2b92e3e6362c2ce11efedc2e3e0af48f4329cadf 100755 (executable)
@@ -103,7 +103,7 @@ function env_info(type)
                end
 
                local function has_nslookup()
-                       return (SYS.call( [[$(which nslookup) localhost 2>&1 | grep -qF "(null)"]] ) ~= 0)
+                       return (SYS.call( [[which nslookup >/dev/null 2>&1]] ) == 0)
                end
 
                if type == "has_bindhost" then