[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 Thu, Nov 02, 2000 at 03:03:55AM -0200, Henrique M Holschuh wrote:
> > Because there is no guarantee that a non-sysv initscript system will work
> > 100% right if the /etc/init.d files are called directly. One of the benefits
> > of invoke-rc.d is abstracting the initscript-call layer so that deploying
> > such initscript systems is not impossible, just difficult :-P
> A "non-sysv initscript system"? Like filerc, that invoke-rc.d presumably
> already supports? Huh?

file-rc is sysv-like. I mean something much more exotic, such as an
initscript subsystem capable of dynamically fetching the init script from
somewhere else. invoke-rc.d allows that sort of stuff to be implemented if
invoke-rc.d is the only allowed way to call initscripts.

And file-rc is not supported by the invoke-rc.d I posted, it is supported by
the invoke-rc.d design. The file-rc package will divert invoke-rc.d and
supply its own, just like it does with update-rc.d.

> Actually, a better reason to insist on people using invoke-rc.d with
> --force would be to fix problems like those described in bugs like 10813.

Yes. One could easily add environment sanitization to invoke-rc.d, if one
wants to (and by all means, go ahead and do it :-) ).

> > > > 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*?
> > > maybe-restart isn't really an option, no scripts implement it.
> > No, but any services which might benefit from it will, given the proper
> > amount of maintainer prodding by users who need it. 
> I don't really think it's a good idea to call maybe-restart for scripts
> that don't implement it.

The initscript should just output an error if it is given an unsupported
action; if it does anything else, that's a bug.

Some rcS.d scripts don't pay attention to their arguments and always
"start", but they're not a problem. I just read all init.d scripts in my
system. All initscripts meant for rc{2,3,4,5}.d will act sanely if given a
maybe-restart action. I believe it is even agaist policy to do otherwise,
but I didn't bother checking.

> Perhaps it'd be better to have
> 	invoke-rc.d foo maybe-restart
> be the way of calling /e/i/foo maybe-restart so it won't get invoked
> when it's not supported?

I don't follow you. You can invoke-rc.d foo maybe-restart to call
maybe-restart directly, yes. It is the way to ask for a maybe-restart, yes.
What has that to do with using maybe-restart as the fallback action for
restart out-of-runlevel ?

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

Reply to: