Add support to daemon-util for distributions without start-stop-daemon
authorJun Futagawa <jfut@integ.jp>
Tue, 15 May 2012 07:38:07 +0000 (16:38 +0900)
committerMichael Hanselmann <hansmi@google.com>
Mon, 21 May 2012 10:43:42 +0000 (12:43 +0200)
commit4b42c3d665d4d92068e4319dfd35e83a54443f3b
tree6aafda6f41cbccbe0746bfe611f366d65dccce1d
parentd67e0a94f717fbbd98ae635a3ea69ef04aa6097b
Add support to daemon-util for distributions without start-stop-daemon

This adds support to daemon-util for Red Hat based distributions that
do not have a start-stop-daemon. If /sbin/start-stop-daemon is not
available, daemon-util will source /etc/rc.d/init.d/functions.
check(), start(), and stop() are updated to use the relevant functions
from /etc/rc.d/init.d/functions.

Thanks to Stephen Fromm and Michael Hanselmann for improving the error
handling, style, and comments.

Signed-off-by: Jun Futagawa <jfut@integ.jp>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
daemons/daemon-util.in