diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2007-01-14 00:55:25 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2007-01-14 00:55:25 +0000 |
commit | 2f2492f7f193885bb13f13805e2f703474018b95 (patch) | |
tree | 049736e190342ed008441efdcf68f6b7c5b1d472 /package/tftpd/init-tftpd | |
parent | ba46d6ef76fee525001aebec7ae78f6dbd89ac23 (diff) |
Update packages to provide properly working initialization scripts. These have been tested with embedded PowerPC systems.
Diffstat (limited to 'package/tftpd/init-tftpd')
-rwxr-xr-x | package/tftpd/init-tftpd | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/package/tftpd/init-tftpd b/package/tftpd/init-tftpd index 7f0146231..41c28d148 100755 --- a/package/tftpd/init-tftpd +++ b/package/tftpd/init-tftpd @@ -1,18 +1,6 @@ #! /bin/sh -# -# Author: Jaakko Niemi <liiwi@iki.fi> -# Modified from skeleton file in sarge - - - - - -#Defaults for tftpd-hpa -RUN_DAEMON="yes" -OPTIONS="-l -s /var/lib/tftpboot" - - +OPTIONS="-c -l -s /var/lib/tftpboot" set -e @@ -23,46 +11,40 @@ DAEMON=/usr/sbin/$NAME PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/S80tftpd-hpa -# Gracefully exit if the package has been removed. -test -x $DAEMON || exit 0 - - -if [ "$RUN_DAEMON" != "yes" ] ; then - echo "tftpd-hpa disabled in /etc/init.d/S80tftpd-hpa" - exit 0 -fi - # # Function that starts the daemon/service. # d_start() { - start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS + mkdir -p /var/lib/tftpboot + chmod 1777 /var/lib/tftpboot + $DAEMON $OPTIONS } # # Function that stops the daemon/service. # d_stop() { - start-stop-daemon --stop --quiet --name $NAME + killall -q $NAME } # # Function that sends a SIGHUP to the daemon/service. # d_reload() { - start-stop-daemon --stop --quiet --name $NAME --signal 1 + d_start + d_stop } case "$1" in start) - echo -n "Starting $DESC: $NAME" + echo -n "Starting $DESC: " d_start - echo "." + echo "done" ;; stop) - echo -n "Stopping $DESC: $NAME" + echo -n "Stopping $DESC: " d_stop - echo "." + echo "done" ;; #reload) # @@ -83,11 +65,11 @@ case "$1" in # option to the "reload" entry above. If not, "force-reload" is # just the same as "restart". # - echo -n "Restarting $DESC: $NAME" + echo -n "Restarting $DESC: " d_stop sleep 1 d_start - echo "." + echo "done" ;; *) # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 |