ddns-scripts: fix misuse of "local"

- fix misuse of "local" outside functions #2885
- update TLD_names.dat

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
Christian Schoenebeck
2016-06-26 10:24:49 +02:00
parent 5d31eaccc6
commit 5d05e01d48
3 changed files with 9 additions and 9 deletions
@@ -27,7 +27,6 @@ use_logfile=0 # by default no logfile, can be changed here
__RET=0
case "$1" in
get_registered_ip)
local IP
lookup_host=$2 # FQDN of host registered at DDNS
use_ipv6=${3:-"0"} # Use IPv6 - default IPv4
force_ipversion=${4:-"0"} # Force IP Version - default 0 - No
@@ -35,6 +34,7 @@ case "$1" in
is_glue=${6:-"0"} # Is glue record - default 0 - No
dns_server=${7:-""} # DNS server - default No DNS
write_log 7 "-----> get_registered_ip IP"
IP=""
get_registered_ip IP
__RET=$?
[ $__RET -ne 0 ] && IP=""
@@ -58,7 +58,6 @@ case "$1" in
__RET=$?
;;
get_local_ip)
local IP
use_ipv6="$2" # Use IPv6
ip_source="$3" # IP source
ip_network="$4" # set if source = "network" otherwise "-"
@@ -76,6 +75,7 @@ case "$1" in
export https_proxy="http://$proxy"
}
# don't need IP only the return code
IP=""
[ "$ip_source" = "web" -o "$ip_source" = "script" ] && {
# we wait only 3 seconds for an
# answer from "web" or "script"