Merge pull request #2029 from yangfl/master

luci-app-ddns: fix huge typo in luasrc/tools/ddns.lua
This commit is contained in:
Hannu Nyman 2018-08-02 08:05:33 +03:00 committed by GitHub
commit fab3ccdc3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 elseif ( type == "has_dnsserver" ) or ( type == "has_bindhost" ) or ( type == "has_hostip" ) or ( type == "has_nslookup" ) then
local function has_bindhost() 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 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 khost >/dev/null 2>&1]] ) == 0) then return true end
if (SYS.call( [[which drill >/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() return has_hostip()
elseif type == "has_nslookup" then elseif type == "has_nslookup" then
return has_nslookup() return has_nslookup()
elseif tyep == "has_dnsserver" then elseif type == "has_dnsserver" then
if has_bindhost() then return true end if has_bindhost() then return true end
if has_hostip() then return true end if has_hostip() then return true end
if has_nslookup() then return true end if has_nslookup() then return true end