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

Bug#664621: status option returns with exit code 4 and 'could not access PID file for [...]'



Package: lsb-base
Version: 3.2+Debian31
Severity: important


If you're stopping e.g. rsyslog and then run:

| /etc/init.d/rsyslog status

you'll get:

| could not access PID file for rsyslog ... failed!

with exit code *4* (same applies to other services like cron,
acpid,...). This is a bit confusing because according to LSB we
have:

| If the status action is requested, the init script will return the
| following exit status codes.
| [...]
| 3   program is not running
| 4   program or service status is unknown

  -- http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

I'd expect to get exit code 3 and a less misleading error message
as the init script/program should be aware of its own state in such
a situation.

I noticed this behaviour also with rsyslog + lsb-base version
3.2-23.2squeeze1 in squeeze (actually R.I.Pienaar noticed it and I
offered to take a look at it). I then stumbled upon
http://bugs.debian.org/545896 ("status_of_proc broken by pidofproc
change") which says that should be fixed.

But I finally found a new origin of that bug: it seems it was
re-introduced in lsb-base 3.2+Debian31:

While up to lsb-base 3.2+Debian30 it seems works as expected:

| # /etc/init.d/rsyslog status
| rsyslogd is not running ... failed!

... with lsb-base 3.2+Debian31 it once again fails as noted above:

| # /etc/init.d/rsyslog status
| could not access PID file for rsyslogd ... failed!

I'm tempted to call this an RC bug, but leaving that decision to the
package maintainer(s).

regards,
-mika-



Reply to: