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

Bug#426877: Clarify what "sensible behaviour" is for init scripts



On Fri, Jul 04, 2008 at 11:59:31AM +0200, Raphael Hertzog wrote:

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

> 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):

Here's a tweak that I think flows a little better:

>From 9b94d8928d7e1faff49bfb0280851751792cd403 Mon Sep 17 00:00:00 2001
From: Steve Langasek <vorlon@debian.org>
Date: Fri, 4 Jul 2008 13:28:38 -0700
Subject: [PATCH] better define sensible behavior for init scripts

---
 policy.sgml |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

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>
-- 
1.5.6


Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org



Reply to: