From: Christian Schoenebeck Date: Thu, 12 Jan 2017 18:26:33 +0000 (+0100) Subject: [for-15.05] ddns-scripts: backport of 2.7.6-11 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F3829%2Fhead;p=feed%2Fpackages.git [for-15.05] ddns-scripts: backport of 2.7.6-11 fix problem with detecting ip from nslookup Signed-off-by: Christian Schoenebeck --- 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"