[Pkg-sysvinit-devel] init.d status behavior
petere at debian.org
Wed Sep 7 17:31:58 UTC 2011
Hi, I'm on a lifelong mission to add support for the "status" action to
init.d scripts in Debian. We already added support to most
"interesting" packages for squeeze, and now we're into the special
cases. Which brings me to this list, because you're (a) top of the
remaining package list now, and (b) probably the most knowledgeable
bunch on this matter in general.
The question is, what to do with init scripts that don't really start a
daemon as such, but just do some one-time or cleanup action in either
"start" or "stop". Example: What should
return (on a normally running system).
0 - program is running or service is OK
4 - program or service status is unknown
or don't implement "status" at all. The latter would cause most
existing init scripts to return either 1 (general error) or 3 (not
implemented), which would be wrong as a "status" return code. So having
a noop "status" of some kind seems preferable.
I'm leaning toward 0/OK, but I'm not set on it.
Side question: Should any message be printed in this case? "Real" init
scripts typically print something like "Foo is running.".
More information about the Pkg-sysvinit-devel