Fix source functions path. Use start-stop-daemon. Signed-off-by: Radu Patriu Upstream-Status: Pending Index: numad/numad.init =================================================================== --- numad.orig/numad.init 2014-03-13 15:27:26.000000000 +0200 +++ numad/numad.init 2014-03-13 16:39:13.089952014 +0200 @@ -6,13 +6,13 @@ ### BEGIN INIT INFO # Provides: numad # Required-Start: cgconfig -# Required-Stop: -# Should-Start: -# Should-Stop: -# Default-Start: -# Default-Stop: +# Required-Stop: +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: # Short-Description: numad control -# Description: +# Description: ### END INIT INFO if [ $(id -u) -ne 0 ]; then @@ -21,7 +21,7 @@ fi # Source function library. -. /etc/rc.d/init.d/functions +. /etc/init.d/functions exec="/usr/bin/numad" prog="numad" @@ -29,32 +29,36 @@ [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog -lockfile=/var/lock/subsys/$prog -base=${0##*/} - start() { [ -x $exec ] || exit 5 [ -f $config ] || exit 6 echo -n $"Starting $prog: " . $config - daemon "$exec -i $INTERVAL" + start-stop-daemon --start --quiet --exec $exec -- -i $INTERVAL -D $DIRECTORY_MOUNT_POINT retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile + if [ $retval -eq 0 ] ; then + echo "OK" + else + echo "FAIL" + fi return $retval } stop() { echo -n $"Stopping $prog: " - killproc $prog + start-stop-daemon --stop --quiet --exec $exec retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile + if [ $retval -eq 0 ] ; then + echo "OK" + else + echo "FAIL" + fi return $retval } restart() { stop + sleep 1 start }