From 76b15db6c3e7db5a12159a98eea3071f0413464d Mon Sep 17 00:00:00 2001 From: Christian Schoenebeck Date: Thu, 12 Jan 2017 19:26:33 +0100 Subject: [PATCH] [for-15.05] ddns-scripts: backport of 2.7.6-11 fix problem with detecting ip from nslookup Signed-off-by: Christian Schoenebeck --- net/ddns-scripts/Makefile | 2 +- net/ddns-scripts/files/dynamic_dns_functions.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 1c5031d3b7..c57c9f326f 100755 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts PKG_VERSION:=2.7.6 # Release == build # increase on changes of services files or tld_names.dat -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Christian Schoenebeck diff --git a/net/ddns-scripts/files/dynamic_dns_functions.sh b/net/ddns-scripts/files/dynamic_dns_functions.sh index e3fd3b01af..001dfa4e63 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -1132,7 +1132,7 @@ get_registered_ip() { elif [ -n "$HOSTIP" ]; then __DATA=$(cat $DATFILE | grep -om1 "$__REGEX") elif [ -n "$NSLOOKUP" ]; then - __DATA=$(cat $DATFILE | sed -e '1,/Name:/d' | grep -om1 "$__REGEX" ) + __DATA=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($__REGEX\).*$/\\1/p }" ) fi [ -n "$__DATA" ] && { write_log 7 "Registered IP '$__DATA' detected" -- 2.30.2