[Pkg-nagios-devel] Bug#721704: pnp4nagios-bin: init script exits 0 when it should exit 3 with unconfigured service
joerg at debian.org
Tue Sep 3 09:41:20 UTC 2013
the pnp4nagios-bin init script contains the following lines:
# Check if RUN is set to "yes" in /etc/defaults/npcd
if [ "x$RUN" != "xyes" ] ; then
echo "$NAME has been disabled in /etc/default/npcd."
While its debatable to do this via default/ file, I'm on the side
of "yeah, ok". What I dislike is the exit 0. Which is wrong.
The LSB defines values for initscripts to give back,
and 0 is defined "program is running or service is OK".
Which it definitely isn't in the case above.
It defines some more, and the most useful return code in this case seems to be
3, "program is not running". Alternatively 4, status unknown, but meh, it is known
Even if one leaves LSB outside and uses common sense, a 0 doesn't seem to
be right for a default value as delivered by the package.
More information about the Pkg-nagios-devel