X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=net%2Fez-ipupdate%2Ffiles%2Fez-ipupdate.hotplug;h=f07542f4f10b639e5f64300dd1d6cc8de93dc73f;hp=8f924f154fce49fe093c8288c6ba0f9ba02fe539;hb=6383e456c372e837411683e7ac6353a60b24a8e2;hpb=af92ba33a6b7c8ec29a57acd1c808f1aab00d15c;ds=inline diff --git a/net/ez-ipupdate/files/ez-ipupdate.hotplug b/net/ez-ipupdate/files/ez-ipupdate.hotplug index 8f924f154f..f07542f4f1 100644 --- a/net/ez-ipupdate/files/ez-ipupdate.hotplug +++ b/net/ez-ipupdate/files/ez-ipupdate.hotplug @@ -25,7 +25,7 @@ case "$ACTION" in config_get pidfile $cfg pidfile pidfile=${pidfile:-/var/run/$NAME-$service-$dev.pid} - + case "$ACTION" in ifdown) cleanup $pidfile @@ -36,7 +36,7 @@ case "$ACTION" in [ ! -e $pidfile ] && { config_get cache $cfg cache [ -z "$cache" ] && cache=/tmp/$NAME-$service-$dev.cache - + config_get config $cfg config [ -z "$config" ] && { config=/var/run/$NAME-$service-$dev.conf @@ -45,9 +45,13 @@ case "$ACTION" in config_get hostname $cfg hostname service=${service:-"dyndns"} config_get server $cfg server + server_line="" + [ -n "$server" ] && { + server_line="server=$server" + } cat > $config <&1 | logger -t $NAME & } ;; @@ -68,12 +72,12 @@ EOF } } } - - + + include /lib/network scan_interfaces config_load ddns - + config_foreach ddns ddns ;; esac