tftpd-hpa: fix premature exit
authorDavid Turgeon <david.turgeon@gmail.com>
Sat, 12 Oct 2013 14:04:00 +0000 (10:04 -0400)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:34:01 +0000 (08:34 -0800)
standalone daemon exits as recipe installs file as tftpd-hpa

* Changed script so it can consult /etc/default, as daemon name may be
 subject to change.
* Changed the default name to match the recipe

(From meta-openembedded rev: d96c23b4cb771da1047ee1bd2011f8e3c4cdc413)

Signed-off-by: David Turgeon <david.turgeon@gmail.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/init

index 5ad8c52..9e18436 100644 (file)
@@ -18,20 +18,21 @@ set -e
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DESC="HPA's tftpd"
-NAME=in.tftpd
-DAEMON=/usr/sbin/$NAME
-PIDFILE=/var/run/$NAME.pid
+NAME=in.tftpd-hpa
 SCRIPTNAME=/etc/init.d/tftpd-hpa
 
-# Gracefully exit if the package has been removed.
-test -x $DAEMON || exit 0
-
 # Read config file if it is present.
 if [ -r /etc/default/tftpd-hpa ]
 then
        . /etc/default/tftpd-hpa
 fi
 
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
 if [ "$RUN_DAEMON" != "yes" ] ; then
          echo "tftpd-hpa disabled in /etc/default/tftpd-hpa"
         exit 0