diff options
author | David Turgeon <david.turgeon@gmail.com> | 2013-10-12 10:04:00 -0400 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2013-10-18 12:26:55 -0400 |
commit | d96c23b4cb771da1047ee1bd2011f8e3c4cdc413 (patch) | |
tree | ed06695f243e670db9ea80db787dfa8fb1bc6aa2 /meta-networking/recipes-daemons/tftp-hpa | |
parent | d56605b3fe5296d73b9851a53ecb3805ec85288b (diff) | |
download | meta-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/init | 13 |
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 | ||
19 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | 19 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin |
20 | DESC="HPA's tftpd" | 20 | DESC="HPA's tftpd" |
21 | NAME=in.tftpd | 21 | NAME=in.tftpd-hpa |
22 | DAEMON=/usr/sbin/$NAME | ||
23 | PIDFILE=/var/run/$NAME.pid | ||
24 | SCRIPTNAME=/etc/init.d/tftpd-hpa | 22 | SCRIPTNAME=/etc/init.d/tftpd-hpa |
25 | 23 | ||
26 | # Gracefully exit if the package has been removed. | ||
27 | test -x $DAEMON || exit 0 | ||
28 | |||
29 | # Read config file if it is present. | 24 | # Read config file if it is present. |
30 | if [ -r /etc/default/tftpd-hpa ] | 25 | if [ -r /etc/default/tftpd-hpa ] |
31 | then | 26 | then |
32 | . /etc/default/tftpd-hpa | 27 | . /etc/default/tftpd-hpa |
33 | fi | 28 | fi |
34 | 29 | ||
30 | DAEMON=/usr/sbin/$NAME | ||
31 | PIDFILE=/var/run/$NAME.pid | ||
32 | |||
33 | # Gracefully exit if the package has been removed. | ||
34 | test -x $DAEMON || exit 0 | ||
35 | |||
35 | if [ "$RUN_DAEMON" != "yes" ] ; then | 36 | if [ "$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 |