Merge pull request #4104 from fanck0605/patch-2

[18.06] luci-app-ddns: fix huge typo in luasrc/tools/ddns.lua
This commit is contained in:
Hannu Nyman 2020-05-27 12:46:01 +03:00 committed by GitHub
commit a1994dac44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ function env_info(type)
end
local function has_curlssl()
return (SYS.call( [[$(which curl) -V 2>&1 | grep "Protocols:" | grep -qF "https"]] ) ~= 0)
return (SYS.call( [[$(which curl) -V 2>&1 | grep "Protocols:" | grep -qF "https"]] ) == 0)
end
local function has_fetch()
@ -92,7 +92,6 @@ function env_info(type)
elseif ( type == "has_dnsserver" ) or ( type == "has_bindhost" ) or ( type == "has_hostip" ) or ( type == "has_nslookup" ) then
local function has_bindhost()
if (SYS.call( [[which host >/dev/null 2>&1]] ) == 0) then return true end
if (SYS.call( [[which host >/dev/null 2>&1]] ) == 0) then return true end
if (SYS.call( [[which khost >/dev/null 2>&1]] ) == 0) then return true end
if (SYS.call( [[which drill >/dev/null 2>&1]] ) == 0) then return true end
@ -113,7 +112,7 @@ function env_info(type)
return has_hostip()
elseif type == "has_nslookup" then
return has_nslookup()
elseif tyep == "has_dnsserver" then
elseif type == "has_dnsserver" then
if has_bindhost() then return true end
if has_hostip() then return true end
if has_nslookup() then return true end