[Bug 806677] Re: status_of_proc returns incorrect number
Jacob Smith
806677 at bugs.launchpad.net
Tue Jul 12 13:47:06 UTC 2011
Anyone have any thoughts?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lsb in Ubuntu.
https://bugs.launchpad.net/bugs/806677
Title:
status_of_proc returns incorrect number
Status in “lsb” package in Ubuntu:
New
Bug description:
I was patching the init script for Arpwatch so that it would be LSB
compliant (adding status) and came across this issue. I believe it
differs from the similarly named bug with code 3/4 problems.
Arpwatch not running. Using the status_of_proc function. Return code
is 0. According to the LSB standard it should be a return code 3. In
the pidofproc() section the match is on line 97 which in turn returns
code 3 on line 98. However when testing this pidofproc() function it
first returns the 3 from line 98 and then it returns 0 from line 100.
No idea why it returns 0 after returning 3? And then if it returned 0
why is it matching on the final else in status_of_proc (anything but 0
or 4?) lines 183/184?
if [ -x /bin/pidof -a ! "$specified" ]; then
status="0"
/bin/pidof -o %PPID -x $1 || status="$?"
if [ "$status" = 1 ]; then
return 3 # program is not running
fi
return 0
fi
The bug for the related Arpwatch package is LP: 806145.
1) Description: Ubuntu 10.04.2 LTS
Release: 10.04
2)lsb-base:
Installed: 4.0-0ubuntu8
Candidate: 4.0-0ubuntu8
Version table:
*** 4.0-0ubuntu8 0
500 http://us.archive.ubuntu.com/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/806677/+subscriptions
More information about the foundations-bugs
mailing list