FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 07-04-2008, 09:59 AM
Raphael Hertzog
 
Default Clarify what "sensible behaviour" is for init scripts

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

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. Iaki, 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.
</p>

<p>

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.

Cheers,
--
Raphal Hertzog

Le best-seller franais mis jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-04-2008, 12:14 PM
Henrique de Moraes Holschuh
 
Default Clarify what "sensible behaviour" is for init scripts

On Fri, 04 Jul 2008, Raphael Hertzog wrote:
> 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.
> </p>
>
> <p>

Seconded. It is unfortunate that we need such explanations for the obvious,
but we certainly *do* need them.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
 
Old 07-04-2008, 12:46 PM
Ben Finney
 
Default Clarify what "sensible behaviour" is for init scripts

Raphael Hertzog <hertzog@debian.org> writes:

> 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.
> </p>
>
> <p>

Looks good to me, modulo the mixed-tabs-and-spaces indentation
problems. Pick one or the other and stick to it.

--
“When I turned two I was really anxious, because I'd doubled my |
` age in a year. I thought, if this keeps up, by the time I'm six |
_o__) I'll be ninety.” —Steven Wright |
Ben Finney


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org