[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:
> On Wed, Nov 01, 2000 at 10:26:33PM -0200, Henrique M Holschuh wrote:
> > 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.
> 
> This could be done with:
> 
> 	if [ -e /etc/init.d/foo ]; then
> 		/etc/init.d/foo stop
> 		invoke-rc.d foo start
> 	fi

No. Maintainer scripts calling /etc/init.d/foo would not be allowed anymore
in any circunstances, and there is no reason to allow any exceptions: one
would only need to use invoke-rc.d --force instead, if one must.

The problem can be summed up as: We cannot detect whether a service is
running or not, and we know a maintainer thinks leaving the service alone is
not wise. However, we MUST avoid starting the service if it is not running
already, therefore "restart" cannot be used.

We attempt to maybe-restart the daemon. If it suceeds, that takes care of
our problem (maybe-restart only restarts an already-running service). If it
fails, what should we do *by default*?

I think that, given that a maintainer already asked the service NOT to be
left alone, stopping it is safer. You think that leaving the service running
is safer. I want you to give me an example of a likely situation where
stoping the out-of-runlevel daemon would be worse than leaving it alone, so
as to better understand your point.

> Probably different things are appropriate in different situations. Having as
> many of them be possible is probably good, too.

Well, as I said, one can *always* force a certain behaviour. invoke-rc.d is
designed not to step in anyone toes as long as the person is really sure of
what she wants to do.

-- 
  "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: pgp0bwVp9JDHj.pgp
Description: PGP signature


Reply to: