diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 2b4edec5c..5a99d8d08 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-scripts PKG_VERSION:=1.0.0 -PKG_RELEASE:=19 +PKG_RELEASE:=20 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh index ba18c8b1c..3d435d3e7 100644 --- a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh @@ -8,8 +8,8 @@ -. /etc/functions.sh -include /lib/network +. /lib/functions.sh +. /lib/functions/network.sh #loads all options for a given package and section @@ -64,13 +64,13 @@ get_current_ip() then ip_network="wan" fi - scan_interfaces - config_load /var/state/network - config_get ip_interface $ip_network ifname fi current_ip=''; - if [ "$ip_source" = "network" ] || [ "$ip_source" = "interface" ] + if [ "$ip_source" = "network" ] + then + network_get_ipaddr current_ip "$ip_network" || return + elif [ "$ip_source" = "interface" ] then current_ip=$(ifconfig $ip_interface | grep -o 'inet addr:[0-9.]*' | grep -o "$ip_regex") elif [ "$ip_source" = "script" ]