Merge pull request #2384 from davidjb/patch-1

luci-app-ddns: check existence of nslookup util rather than making DNS request
This commit is contained in:
Dirk Brenken 2019-01-05 18:01:22 +01:00 committed by GitHub
commit a6805ed9fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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