[for-15.05] ddns-scripts: backport of 2.7.6-11

fix problem with detecting ip from nslookup

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
Christian Schoenebeck 2017-01-12 19:26:33 +01:00
parent 728f37ad15
commit 76b15db6c3
2 changed files with 2 additions and 2 deletions

View file

@ -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 <christian.schoenebeck@gmail.com>

View file

@ -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"