[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Clarify what "sensible behaviour" is for init scripts

In-Reply-To: <20080704083242.GA12358@dario.dodds.net>

reassign 426877 debian-policy
retitle 426877 Clarify what "sensible behaviour" is for init scripts

Ok, this confirms my initial feeling. Changing this in dpkg would require
a wide-scale testing and much effort for little gains since the policy
already require packages to behave sensibly. Iñaki, if you ever encounter
bad init scripts, please report bugs against the offending packages.

On Fri, 04 Jul 2008, Steve Langasek wrote:
> Feel free to propose an amendment to policy that clarifies that "sensible"
> behavior is equivalent to --oknodo (without implying that init scripts are
> required to use s-s-d!), and I will happily second it; as I already
> commented in that thread, I think this is a mere clarification of what the
> policy has always been, not a change to policy at all.

Here's a try (against current master branch):
diff --git a/policy.sgml b/policy.sgml
index c9bd84f..772afce 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -5946,9 +5946,11 @@ rmdir /usr/local/share/emacs 2>/dev/null || true
 	    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
+	    isn't (in particular, they should not exit with a non-zero
+            error code), 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>.
+	    <prgn>start-stop-daemon</prgn> and its <tt>--oknodo</tt>
+            option.

Russ, feel free to clone against lintian if you think that it makes sense
that it warns usage of start-stop-daemon without this option.

Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :

Reply to: