From: Florian Fainelli Date: Sat, 2 Jan 2010 16:30:29 +0000 (+0000) Subject: [package] fix update_url option handling (#6127), bump release number X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eb369849573dbca76c77440115b8f489df1b1d82;p=openwrt%2Fsvn-archive%2Farchive.git [package] fix update_url option handling (#6127), bump release number SVN-Revision: 19009 --- diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 53cb961f10..b9f715d31b 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:=5 +PKG_RELEASE:=6 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh index ed0396da9c..b7824326b4 100755 --- a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh @@ -233,7 +233,7 @@ do current_time=$(date +%s) time_since_update=$(($current_time - $last_update)) - + verbose_echo "Running IP check..." verbose_echo "current system ip = $current_ip" @@ -248,13 +248,16 @@ do final_url=$update_url for option_var in $ALL_OPTION_VARIABLES do - replace_name=$(echo "\[$option_var\]" | tr 'a-z' 'A-Z') - replace_value=$(eval echo "\$$option_var") - replace_value=$(echo $replace_value | sed -f /usr/lib/ddns/url_escape.sed) - final_url=$(echo $final_url | sed s^"$replace_name"^"$replace_value"^g ) - done + if [ "$option_var" != "update_url" ] + then + replace_name=$(echo "\[$option_var\]" | tr 'a-z' 'A-Z') + replace_value=$(eval echo "\$$option_var") + replace_value=$(echo $replace_value | sed -f /usr/lib/ddns/url_escape.sed) + final_url=$(echo $final_url | sed s^"$replace_name"^"$replace_value"^g ) + fi + done final_url=$(echo $final_url | sed s/"\[IP\]"/"$current_ip"/g ) - + verbose_echo "updating with url=\"$final_url\"" @@ -270,10 +273,10 @@ do last_update=$current_time time_since_update='0' registered_ip=$current_ip - + human_time=$(date) verbose_echo "update complete, time is: $human_time" - + echo "$last_update" > "/var/run/dynamic_dns/$service_id.update" else human_time=$(date)