From: thepeople Date: Fri, 26 Feb 2010 04:54:10 +0000 (+0000) Subject: [patchteam] ez-ipupdate: [PATCH] unnecessarily runs as a daemon (also allow multiple... X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=e210b3ed39dc3842f3977ce82ffb769074387077;p=packages.git [patchteam] ez-ipupdate: [PATCH] unnecessarily runs as a daemon (also allow multiple instances), closes #4874 git-svn-id: svn://svn.openwrt.org/openwrt/packages@19866 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/net/ez-ipupdate/files/ez-ipupdate.hotplug b/net/ez-ipupdate/files/ez-ipupdate.hotplug index f9c96a410..0c1b6638f 100644 --- a/net/ez-ipupdate/files/ez-ipupdate.hotplug +++ b/net/ez-ipupdate/files/ez-ipupdate.hotplug @@ -21,8 +21,10 @@ case "$ACTION" in config_get enabled $cfg enabled enabled=${enabled:-1} + config_get service $cfg service + config_get pidfile $cfg pidfile - pidfile=${pidfile:-/var/run/$NAME-$dev.pid} + pidfile=${pidfile:-/var/run/$NAME-$service-$dev.pid} case "$ACTION" in ifdown) @@ -33,12 +35,11 @@ case "$ACTION" in 1|yes|true) [ ! -e $pidfile ] && { config_get cache $cfg cache - [ -z "$cache" ] && cache=/tmp/$NAME-$dev.cache + [ -z "$cache" ] && cache=/tmp/$NAME-$service-$dev.cache config_get config $cfg config [ -z "$config" ] && { - config=/var/run/$NAME-$dev.conf - config_get service $cfg service + config=/var/run/$NAME-$service-$dev.conf config_get username $cfg username config_get password $cfg password config_get hostname $cfg hostname @@ -54,7 +55,7 @@ quiet EOF } - $COMMAND -d -c $config 2>&1 | logger -t $NAME & + $COMMAND -c $config 2>&1 | logger -t $NAME & } ;; *)