ddns-scripts: fix incompatibility with luci-app-ddns <= V.2.4.8-2
authorChristian Schoenebeck <redacted>
Sun, 14 Jan 2018 19:27:59 +0000 (20:27 +0100)
committerChristian Schoenebeck <redacted>
Sun, 14 Jan 2018 19:27:59 +0000 (20:27 +0100)
fix incompatibility with luci-app-ddns versions <= 2.4.8-2 (#5430)

Signed-off-by: Christian Schoenebeck <redacted>
net/ddns-scripts/Makefile
net/ddns-scripts/files/dynamic_dns_functions.sh

index ce695b647f39f6a98c46aa1943c0a3a37ea5c99d..30ef883e5b82d0d45b093c3416928c0c1c45843e 100755 (executable)
@@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts
 PKG_VERSION:=2.7.7
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
index a64167f54601e977e7a0bd9bc439830666e2a4d9..90501ac695a507c2203eb350fde59512e7d136af 100755 (executable)
@@ -1144,14 +1144,14 @@ get_registered_ip() {
                        fi
                        [ -n "$__DATA" ] && {
                                write_log 7 "Registered IP '$__DATA' detected"
-                               echo "$__DATA" > $IPFILE
+                               [ -z "$IPFILE" ] || echo "$__DATA" > $IPFILE
                                eval "$1=\"$__DATA\""   # valid data found
                                return 0                # leave here
                        }
                        write_log 4 "NO valid IP found"
                        __ERR=127
                fi
-               echo "" > $IPFILE
+               [ -z "$IPFILE" ] || echo "" > $IPFILE
 
                [ -n "$LUCI_HELPER" ] && return $__ERR  # no retry if called by LuCI helper script
                [ -n "$2" ] && return $__ERR            # $2 is given -> no retry
git clone https://git.99rst.org/PROJECT