From 0491397d7648fd70ad0a6cef9e8626b9c2a968e9 Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Mon, 8 Aug 2011 23:34:33 -0700 Subject: [PATCH 1/2] Remove/fix deprecated start-stop-daemon functions daemon-util uses the deprecated functions --startas, --chuid and, most importantly, --oknodo. The last one causes start-stop-daemon to exit with a non-zero status, which makes openrc think it crashed (when in reality it just shut down properly) [1]. [1] https://bugs.gentoo.org/show_bug.cgi?id=377905 --- daemons/daemon-util.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in index b754e7f..c19daa7 100644 --- a/daemons/daemon-util.in +++ b/daemons/daemon-util.in @@ -222,10 +222,10 @@ start() { @PKGLIBDIR@/ensure-dirs if type -p start-stop-daemon >/dev/null; then - start-stop-daemon --start --quiet --oknodo \ + start-stop-daemon --start --quiet \ --pidfile $pidfile \ - --startas $daemonexec \ - --chuid $usergroup \ + --exec $daemonexec \ + --user $usergroup \ -- $args "$@" else # TODO: Find a way to start daemon with a group, until then the group must @@ -248,7 +248,7 @@ stop() { local pidfile=$(_daemon_pidfile $name) if type -p start-stop-daemon >/dev/null; then - start-stop-daemon --stop --quiet --oknodo --retry 30 \ + start-stop-daemon --stop --quiet --retry 30 \ --pidfile $pidfile else _ignore_error killproc -p $pidfile $name -- 1.7.9.5