diff options
author | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2016-02-06 16:33:59 +0100 |
---|---|---|
committer | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2016-02-06 16:33:59 +0100 |
commit | e4856c76318e7f4cb992286d978086a435f2fc51 (patch) | |
tree | 03791bfe2423d2f46ff20e60626eaa997083cbc6 /applications/luci-app-ddns/luasrc/tools/ddns.lua | |
parent | 8ae57f62044ab9ac73a9113417e33c23aedc1974 (diff) |
luci-app-ddns: some fixes
- fixes for https://dev.openwrt.org/ticket/21787
- changed detection of BusyBox nslookup compiled with musl, thanks to Arjen de Korte
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-ddns/luasrc/tools/ddns.lua')
-rwxr-xr-x | applications/luci-app-ddns/luasrc/tools/ddns.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/applications/luci-app-ddns/luasrc/tools/ddns.lua b/applications/luci-app-ddns/luasrc/tools/ddns.lua index 8868f32bcd..54791432b3 100755 --- a/applications/luci-app-ddns/luasrc/tools/ddns.lua +++ b/applications/luci-app-ddns/luasrc/tools/ddns.lua @@ -16,16 +16,16 @@ local function _check_certs() return (v > 0) end -has_wgetssl = (UTIL.exec( [[which wget-ssl]] ) ~= "") -- and true or nil -has_curl = (UTIL.exec( [[which curl]] ) ~= "") -has_curlssl = (SYS.call( [[$(which curl) -V | grep "Protocols:" | grep -qF "https"]] ) ~= 0) +has_wgetssl = (SYS.call( [[which wget-ssl >/dev/null 2>&1]] ) == 0) -- and true or nil +has_curl = (SYS.call( [[which curl >/dev/null 2>&1]] ) == 0) +has_curlssl = (SYS.call( [[$(which curl) -V 2>&1 | grep "Protocols:" | grep -qF "https"]] ) ~= 0) has_curlpxy = (SYS.call( [[grep -i "all_proxy" /usr/lib/libcurl.so* >/dev/null 2>&1]] ) == 0) -has_fetch = (UTIL.exec( [[which uclient-fetch]] ) ~= "") +has_fetch = (SYS.call( [[which uclient-fetch >/dev/null 2>&1]] ) == 0) has_fetchssl = NXFS.access("/lib/libustream-ssl.so") -has_bbwget = (SYS.call( [[/usr/bin/wget -V 2>&1 | grep -iqF "busybox"]] ) == 0) -has_bindhost = (UTIL.exec( [[which host]] ) ~= "") -has_hostip = (UTIL.exec( [[which hostip]] ) ~= "") -has_nslookup = (SYS.call( [[$(which nslookup) 127.0.0.1 0 >/dev/null 2>&1]] ) ~= 0) +has_bbwget = (SYS.call( [[$(which wget) -V 2>&1 | grep -iqF "busybox"]] ) == 0) +has_bindhost = (SYS.call( [[which host >/dev/null 2>&1]] ) == 0) +has_hostip = (SYS.call( [[which hostip >/dev/null 2>&1]] ) == 0) +has_nslookup = (SYS.call( [[$(which nslookup) localhost 2>&1 | grep -qF "(null)"]] ) ~= 0) has_ipv6 = (NXFS.access("/proc/net/ipv6_route") and NXFS.access("/usr/sbin/ip6tables")) has_ssl = (has_wgetssl or has_curlssl or (has_fetch and has_fetchssl)) has_proxy = (has_wgetssl or has_curlpxy or has_fetch or has_bbwget) |