|
|
@ -73,23 +73,23 @@ DNS_CHARSET="[@a-zA-Z0-9._-]" |
|
|
|
LUCI_HELPER=$(printf %s "$MYPROG" | grep -i "luci") |
|
|
|
|
|
|
|
# Name Server Lookup Programs |
|
|
|
BIND_HOST=$(which host) |
|
|
|
KNOT_HOST=$(which khost) |
|
|
|
DRILL=$(which drill) |
|
|
|
HOSTIP=$(which hostip) |
|
|
|
NSLOOKUP=$(which nslookup) |
|
|
|
BIND_HOST=$(command -v host) |
|
|
|
KNOT_HOST=$(command -v khost) |
|
|
|
DRILL=$(command -v drill) |
|
|
|
HOSTIP=$(command -v hostip) |
|
|
|
NSLOOKUP=$(command -v nslookup) |
|
|
|
|
|
|
|
# Transfer Programs |
|
|
|
WGET=$(which wget) |
|
|
|
WGET_SSL=$(which wget-ssl) |
|
|
|
WGET=$(command -v wget) |
|
|
|
WGET_SSL=$(command -v wget-ssl) |
|
|
|
|
|
|
|
CURL=$(which curl) |
|
|
|
CURL=$(command -v curl) |
|
|
|
# CURL_SSL not empty then SSL support available |
|
|
|
CURL_SSL=$($CURL -V 2>/dev/null | grep -F "https") |
|
|
|
# CURL_PROXY not empty then Proxy support available |
|
|
|
CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy") |
|
|
|
|
|
|
|
UCLIENT_FETCH=$(which uclient-fetch) |
|
|
|
UCLIENT_FETCH=$(command -v uclient-fetch) |
|
|
|
|
|
|
|
# Global configuration settings |
|
|
|
# allow NON-public IP's |
|
|
@ -491,8 +491,8 @@ sanitize_variable() { |
|
|
|
verify_host_port() { |
|
|
|
local __HOST=$1 |
|
|
|
local __PORT=$2 |
|
|
|
local __NC=$(which nc) |
|
|
|
local __NCEXT=$($(which nc) --help 2>&1 | grep "\-w" 2>/dev/null) # busybox nc compiled with extensions |
|
|
|
local __NC=$(command -v nc) |
|
|
|
local __NCEXT=$($(command -v nc) --help 2>&1 | grep "\-w" 2>/dev/null) # busybox nc compiled with extensions |
|
|
|
local __IP __IPV4 __IPV6 __RUNPROG __PROG __ERR |
|
|
|
# return codes |
|
|
|
# 1 system specific error |
|
|
@ -921,7 +921,7 @@ get_local_ip () { |
|
|
|
[ -n "$__DATA" ] && write_log 7 "Local IP '$__DATA' detected on network '$ip_network'" |
|
|
|
elif [ -n "$ip_interface" -a "$ip_source" = "interface" ]; then |
|
|
|
local __DATA4=""; local __DATA6="" |
|
|
|
if [ -n "$(which ip)" ]; then # ip program installed |
|
|
|
if [ -n "$(command -v ip)" ]; then # ip program installed |
|
|
|
write_log 7 "#> ip -o addr show dev $ip_interface scope global >$DATFILE 2>$ERRFILE" |
|
|
|
ip -o addr show dev $ip_interface scope global >$DATFILE 2>$ERRFILE |
|
|
|
__ERR=$? |
|
|
@ -1124,7 +1124,7 @@ get_registered_ip() { |
|
|
|
__RUNPROG="$__PROG $lookup_host >$DATFILE 2>$ERRFILE" |
|
|
|
__PROG="hostip" |
|
|
|
elif [ -n "$NSLOOKUP" ]; then # last use BusyBox nslookup |
|
|
|
NSLOOKUP_MUSL=$($(which nslookup) localhost 2>&1 | grep -F "(null)") # not empty busybox compiled with musl |
|
|
|
NSLOOKUP_MUSL=$($(command -v nslookup) localhost 2>&1 | grep -F "(null)") # not empty busybox compiled with musl |
|
|
|
[ $force_dnstcp -ne 0 ] && \ |
|
|
|
write_log 14 "Busybox nslookup - no support for 'DNS over TCP'" |
|
|
|
[ -n "$NSLOOKUP_MUSL" -a -n "$dns_server" ] && \ |
|
|
|