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

Re: RFC: initscript policy proposal



On Thu, 02 Nov 2000, Anthony Towns wrote:
> Gah. Do we have to keep cross-posting threads to multiple lists?

Sorry, the initial post did belong to both lists :-) For what it's worth,
this one goes to -devel only.

> > However, the difficult work required for a mandatory "maybe-restart" will
> > need to be done to implement the LSB "status" mandatory option anyway. So
> > _maybe_ it would be better to just make "maybe-restart" non-optional and be
> > done with it. (Before anyone starts a flamewar over this, READ THE LAST
> > PARAGRAPH OF THIS MESSAGE. Thank you).
> 
> The LSB requirements you're describing here probably relate to the
> init scripts of LSB packages, not any init scripts provided by the
> distribution.

Well, I was under the impression that the LSB was trying to set a standard
we were supposed to (try to) follow (as closely as possible), including the
initscripts... not that they were writing a initscript standard for their
own initscripts (why do they need initscripts in their packages anyway?).
Whatever, it doesn't matter much. :-)

> > > I propose that instead of "restarts converted to stops" we just go with
> > > "restarts ignored". I realize that this would cause the new version of
[...]
> > I spent some time thinking about that, and I decided that 'stop' was the
> > safer approach, as it is very unlikely that a mission-critical component
> 
> The ignore option is probably better. If the maintainer wants to force
> a stop (if the previous daemon will misbehave if its left running after
> the new daemon is installed), it can be done by saying `/etc/init.d/foo
> stop'. OTOH, having the stop only happen when it's expected to be running
> isn't possible to fake.

The new code (not posted yet) tries a maybe-restart, and if that fails, a
stop. This is a bit different, but closer to the invoke-rc.d stop ;
invoke-rc.d start sequence (service is stopped, and maybe started again)
than ignoring restart (service keeps running) would be.

I am worried about packages which do /etc/init.d/foo restart when foo isn't
even a service they provide. For those situations, stop seems to me like a
safer *default* behaviour than ignoring the request. The service is given a
fair chance (in the new code) to avoid a stop if out-of-runlevel, it just
needs to implement maybe-restart.

Could someone exemplify a situation where ignore would be safer? I'd need
only to change restart to maybe-restart, then. After all, if maybe-restart
isn't implemented it will be equivalent to "do nothing but output error
messages". I just want to make sure which way is the safest bet.

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

Attachment: pgpjayV4FQUa8.pgp
Description: PGP signature


Reply to: