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

Re: Checking init.d script for policy compliance.

On Wed, Apr 02, 2003 at 06:49:11PM +0100, Colin Watson wrote:
> On Wed, Apr 02, 2003 at 04:55:32PM +0200, Bill Allombert wrote:
> > Wrong exit status when stopped but not running
> > inetd lpd nfs-common portmap ssh *pdnsd *exim *gpm *lprng
> I'd like to fix ssh, but I can't find the policy on init scripts' exit
> statuses. Can you point me to it, please?

Especially since I was confused and I report nonbug as bug and

> (Not trying to be pedantic; I just would rather follow a written policy
> than try to guess the correct behaviour from other init scripts, an
> unknown number of which are reportedly wrong.)

I am fully with you here. I just want all init.d script to behave the
same. I suppose we can standardise on the LSB 1.3. which has an extended
description of init.d scripts behaviour.


Here a small extract, but please read it completly:

          In addition to straightforward success, the following situations
   are also to be considered successful:

     * restarting a service (instead of reloading it) with the "force-reload"

     * running "start" on a service already running

     * running "stop" on a service already stopped or not running

     * running "restart" on a service already stopped or not running

So both start and stop should use --oknodo or equivalent.
So you should add --oknodo to start instead of removing it of stop.
Exactly the opposite of what I was saying... gasp.

Maybe this should be brought to the policy mailing list ? But this
does not fit the 'widely deployed' criterium.

LSB document more exit condition outside 0 and 1.  As a transitional
measure, we may want to allow 1 as error status for all error.

> > I realize that 'Wrong exit status when stopped but not running' can be
> > controversial, but if you enoxerate these packages, you need to bu the
> > others...
> What was "bu" a typo for?


Sorry to have been so vague.

Bill. <ballombe@debian.org>

Reply to: