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

Re: RFC: initscript policy proposal

On Thu, 2 Nov 2000, Henrique M Holschuh wrote:

> On Thu, 02 Nov 2000, Mark Rahner wrote:
> > Henrique M Holschuh wrote:
> > > maybe-restart means exectly that: restart only if currently running.
> > 
> > I had been wondering about this.  It's a shame this isn't called
> > restart-if-running.

I absolutely don't understand why you want to introduce a "maybe" restart
instead of sanely defining the semantics of the "existing" restart and
correctly implementing it.

The problem of finding the right service to restart comes into existence
when the service is *started* and *that's* the exact place where the
problem needs to be dealt with. In other words: the start-stop-daemon

Otherways you need AI to deal with all the im/possible ways a service can
get lost, fork, detach, rename, start child processes, etc....

The majority of the scripts that today are restarting a service should
really do a "restart-if-runnning". So if you introduce "restart-if-runing"
the developpers will have change their script *anyway* to reach a sane
behaveour of their services. So why not do it the right way in the first

One wants to:

- *Either* start a service and in case it already *is* running exit
  gracefully (or launch another parallel service, but I doubt there's a
  real need today for such a feature and you would be in trouble *anyway*
  with maybe-restart-if-running)
- *Or* to restart it, but only if it is running. I doubt that restarting a
  non-runing service makes any sense.


             Tomas Pospisek
	     SourcePole   -  Linux & Open Source Solutions
	     Elestastrasse 18, 7310 Bad Ragaz, Switzerland
	     Tel: +41 (81) 330 77 11

Reply to: