ddns-scripts: no longer break using nslookup and option force_ipversion=1
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>
Sun, 25 Sep 2016 09:11:28 +0000 (11:11 +0200)
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>
Mon, 26 Sep 2016 19:24:35 +0000 (21:24 +0200)
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
net/ddns-scripts/Makefile
net/ddns-scripts/files/dynamic_dns_functions.sh
net/ddns-scripts/files/update_nsupdate.sh

index 1177402375b4d10b95e139441d8d27ae89263402..e2bde8cd51863c9d3cfac42efb9c676879a18b35 100755 (executable)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ddns-scripts
 # Version == major.minor.patch
 # increase on new functionality (minor) or patches (patch)
-PKG_VERSION:=2.7.4
+PKG_VERSION:=2.7.5
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=4
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
index 642b3fc301d76c360bd7fabe3d2ec7b65f0ae01c..fafda1beda9e12e38a0e8b5cd5c12ad86f41ff93 100755 (executable)
@@ -1062,10 +1062,12 @@ get_registered_ip() {
                __RUNPROG="$__PROG $lookup_host >$DATFILE 2>$ERRFILE"
                __PROG="hostip"
        elif [ -n "$NSLOOKUP" ]; then   # last use BusyBox nslookup
-               [ $force_ipversion -ne 0 -o $force_dnstcp -ne 0 ] && \
-                       write_log 14 "Busybox nslookup - no support to 'force IP Version' or 'DNS over TCP'"
+               [ $force_dnstcp -ne 0 ] && \
+                       write_log 14 "Busybox nslookup - no support for 'DNS over TCP'"
                [ -n "$NSLOOKUP_MUSL" -a -n "$dns_server" ] && \
                        write_log 14 "Busybox compiled with musl - nslookup don't support the use of DNS Server"
+               [ $force_ipversion -ne 0 ] && \
+                       write_log 5 "Busybox nslookup - no support to 'force IP Version' (ignored)"
 
                __RUNPROG="$NSLOOKUP $lookup_host $dns_server >$DATFILE 2>$ERRFILE"
                __PROG="BusyBox nslookup"
index 5d952cb2c588b0d33efb4d5e7af0f1067d396096..539533cc58c11d33e4cdb8fe5c0c04f563a89391 100644 (file)
@@ -15,9 +15,9 @@
 #
 # variable __IP already defined with the ip-address to use for update
 #
-__TTL=600              #.preset DNS TTL (in seconds)
-__RRTYPE __PW __TCP
-__PROG=$(which nsupdate)                       # BIND nsupdate ?
+local __TTL=600                #.preset DNS TTL (in seconds)
+local __RRTYPE __PW __TCP
+local __PROG=$(which nsupdate)                 # BIND nsupdate ?
 [ -z "$__PROG" ] && __PROG=$(which knsupdate)  # Knot nsupdate ?
 
 [ -z "$__PROG" ]     && write_log 14 "'nsupdate' or 'knsupdate' not installed !"