PKG_VERSION:=2.7.1
# Release == build
# increase on changes of services files or tld_names.dat
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
# 1 no IP detected
[ $# -lt 1 -o $# -gt 2 ] && write_log 12 "Error calling 'get_registered_ip()' - wrong number of parameters"
- [ $is_glue -eq 1 ] && [ -z "$(which host)" ] && write_log 12 "Update of glue records is only supported using BIND host"
+ [ $is_glue -eq 1 -a -z "$(which host)" ] && write_log 12 "Update of glue records is only supported using BIND host"
write_log 7 "Detect registered/public IP"
# set correct regular expression
write_log 7 "$(cat $ERRFILE)"
else
if [ "$__PROG" = "BIND host" ]; then
- __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' )
-
if [ $is_glue -eq 1 ]; then
__DATA=$(cat $DATFILE | grep "^$lookup_host" | grep -m 1 -o "$__REGEX" )
else
force_ipversion=${4:-"0"} # Force IP Version - default 0 - No
force_dnstcp=${5:-"0"} # Force TCP on DNS - default 0 - No
dns_server=${6:-""} # DNS server - default No DNS
+ is_glue=${7:-"0"} # Is glue record - default 0 - No
write_log 7 "-----> get_registered_ip IP"
get_registered_ip IP
__RET=$?
[ -z "$force_ipversion" ] && force_ipversion=0 # default let system decide
[ -z "$force_dnstcp" ] && force_dnstcp=0 # default UDP
[ -z "$ip_source" ] && ip_source="network"
+[ -z "$is_glue" ] && is_glue=0 # default the ddns record is not a glue record
[ "$ip_source" = "network" -a -z "$ip_network" -a $use_ipv6 -eq 0 ] && ip_network="wan" # IPv4: default wan
[ "$ip_source" = "network" -a -z "$ip_network" -a $use_ipv6 -eq 1 ] && ip_network="wan6" # IPv6: default wan6
[ "$ip_source" = "web" -a -z "$ip_url" -a $use_ipv6 -eq 0 ] && ip_url="http://checkip.dyndns.com"