[lsb-discuss] gLSB: sysinit: clearify algorithm for determining status of programs

Bill Nottingham notting at redhat.com
Wed Sep 3 14:46:08 PDT 2003


Tobias Burnus (tobias.burnus at physik.fu-berlin.de) said: 
> > Tobias Burnus (tobias.burnus at physik.fu-berlin.de) 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
> ;;

I don't like that as much because it implies duplicating that code
in all the non-pidfile using scripts, but that's not a huge deal.

Bill




More information about the lsb-discuss mailing list