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

Re: RFC: initscript policy proposal



On Thu, 02 Nov 2000, Ola Lundqvist wrote:
> On Thu, Nov 02, 2000 at 05:24:29AM +0000, Julian Gilbey wrote:
> > I think the fundamental problem here is that we do not have a generic
> > way of testing whether a service is running or not.  If we did, then

Yes.

> > restart should mean "restart only if currently running", unless that
> > is what "maybe-restart" is meant to mean....

maybe-restart means exectly that: restart only if currently running.

> Well we do not have any generic way but every server have at least one
> process and it is quite easy to find it if you just got the name of it.

No, it's not. It is a non-trivial problem at best. There's a thread about
this in the -devel archives.

> if ps xa | grep -v grep | grep name; then
> 	stopit
> fi

The stuff above isn't safe, we can't allow false-positives (that's why I say
it is non-trivial). Please read the -devel thread.

maybe-restart allows you to write service-specific code, which can take
advantage of whatever is the best way to detect if a particular service is
active or not; this is more flexible than any 'generic' solution we might
find.

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


Reply to: