From: Steve Langasek <vorlon@debian.org>
Date: Sat, 5 Jul 2008 21:52:07 +0000 (-0700)
Subject: Clarify what "sensible behaviour" is for init scripts
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b2e669e6c64584478572ee6c1f7342ff97e14619;p=debian%2Fdebian-policy.git

Clarify what "sensible behaviour" is for init scripts

Clarify that sensible behavior for start includes not starting
another daemon and exiting successfully when the daemon is already
running.

Closes: #426877
---

diff --git a/policy.sgml b/policy.sgml
index c9bd84f..24c9072 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -5944,11 +5944,13 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
 
 	  <p>
 	    The <file>init.d</file> scripts must ensure that they will
-	    behave sensibly if invoked with <tt>start</tt> when the
-	    service is already running, or with <tt>stop</tt> when it
-	    isn't, and that they don't kill unfortunately-named user
-	    processes.  The best way to achieve this is usually to use
-	    <prgn>start-stop-daemon</prgn>.
+	    behave sensibly (i.e., returning success and not starting
+	    multiple copies of a service) if invoked with <tt>start</tt>
+	    when the service is already running, or with <tt>stop</tt>
+	    when it isn't, and that they don't kill unfortunately-named
+	    user processes.  The best way to achieve this is usually to
+	    use <prgn>start-stop-daemon</prgn> with the <tt>--oknodo</tt>
+	    option.
 	  </p>
 
 	  <p>