summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/tftp-hpa
diff options
context:
space:
mode:
authorDavid Turgeon <david.turgeon@gmail.com>2013-10-12 10:04:00 -0400
committerJoe MacDonald <joe@deserted.net>2013-10-18 12:26:55 -0400
commitd96c23b4cb771da1047ee1bd2011f8e3c4cdc413 (patch)
treeed06695f243e670db9ea80db787dfa8fb1bc6aa2 /meta-networking/recipes-daemons/tftp-hpa
parentd56605b3fe5296d73b9851a53ecb3805ec85288b (diff)
downloadmeta-openembedded-d96c23b4cb771da1047ee1bd2011f8e3c4cdc413.tar.gz
tftpd-hpa: fix premature exit
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 Signed-off-by: David Turgeon <david.turgeon@gmail.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-daemons/tftp-hpa')
-rw-r--r--meta-networking/recipes-daemons/tftp-hpa/files/init13
1 files changed, 7 insertions, 6 deletions
diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/init b/meta-networking/recipes-daemons/tftp-hpa/files/init
index 5ad8c52cb..9e1843635 100644
--- a/meta-networking/recipes-daemons/tftp-hpa/files/init
+++ b/meta-networking/recipes-daemons/tftp-hpa/files/init
@@ -18,20 +18,21 @@ set -e
18 18
19PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 19PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
20DESC="HPA's tftpd" 20DESC="HPA's tftpd"
21NAME=in.tftpd 21NAME=in.tftpd-hpa
22DAEMON=/usr/sbin/$NAME
23PIDFILE=/var/run/$NAME.pid
24SCRIPTNAME=/etc/init.d/tftpd-hpa 22SCRIPTNAME=/etc/init.d/tftpd-hpa
25 23
26# Gracefully exit if the package has been removed.
27test -x $DAEMON || exit 0
28
29# Read config file if it is present. 24# Read config file if it is present.
30if [ -r /etc/default/tftpd-hpa ] 25if [ -r /etc/default/tftpd-hpa ]
31then 26then
32 . /etc/default/tftpd-hpa 27 . /etc/default/tftpd-hpa
33fi 28fi
34 29
30DAEMON=/usr/sbin/$NAME
31PIDFILE=/var/run/$NAME.pid
32
33# Gracefully exit if the package has been removed.
34test -x $DAEMON || exit 0
35
35if [ "$RUN_DAEMON" != "yes" ] ; then 36if [ "$RUN_DAEMON" != "yes" ] ; then
36 echo "tftpd-hpa disabled in /etc/default/tftpd-hpa" 37 echo "tftpd-hpa disabled in /etc/default/tftpd-hpa"
37 exit 0 38 exit 0