Re: gLSB: sysinit: clearify algorithm for determining status of programs

Tobias Burnus <[email protected]>
Newsgroups gmane.linux.lsb.discuss
Message-ID <[email protected]>
Hello,

On Wed, Sep 03, 2003 at 05:19:10PM -0400, Bill Nottingham wrote:
> Tobias Burnus ([email protected]) said: 
> > If there is no pidfile no further checks shall be done.
This is ment for the pidofproc script as defined in
/lib/lsb/init-functions.

> > If a script really has no pidfile then it can use pidof (part of LSB) or
> > pkill/pgrep (not part of LSB).
This is ment for those /etc/init.d/* init scripts that need it.

> Maybe I missed part of your discussion, but how do you
> programmatically determine this case; do you just specifying
> this when calling pidofproc?

I mean that if /opt/foo/sbin/mydaemon has no pidfile, then I can do this
in the init script /etc/init.d/foo-mydaemon:

status)
      # I know there is no pid file and thus I cannot use pidofproc
      # let's use pidof instead
      pidof -o $$ -o $PPID -o %PPID /opt/foo/sbin/mydaemon
;;


Tobias
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.