[patchteam] ez-ipupdate: [PATCH] unnecessarily runs as a daemon (also allow multiple...
authorTravis Kemen <thepeople@openwrt.org>
Fri, 26 Feb 2010 04:54:10 +0000 (04:54 +0000)
committerTravis Kemen <thepeople@openwrt.org>
Fri, 26 Feb 2010 04:54:10 +0000 (04:54 +0000)
SVN-Revision: 19866

net/ez-ipupdate/files/ez-ipupdate.hotplug

index f9c96a4..0c1b663 100644 (file)
@@ -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 &
                                    }
                                    ;;
                                *)