[SRU]nut init script reports incorrect status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nut (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jaunty |
Won't Fix
|
Undecided
|
Chuck Short |
Bug Description
Binary package hint: nut
Ubuntu release: 9.04
Package: nut 2.4.1-2ubuntu4
When checking the status of nut with
/etc/init.d/nut status
the script gave the output
Checking status of Network UPS Tools
* upsd is not running
* upsmon is not running
even though both upsd and upsmon were indeed running as shown by the ps command.
I did some digging through the nut init script and found what I believe to be the problem. The script calls a function status_of_proc as follows:
status_of_proc "$DESC" upsd
The first argument to that function should be the full pathname of the daemon. I recommend changing the above line to:
status_of_proc $upsd upsd
Two other uses of the status_of_proc function in the init script regarding upsmon should be changed in a likewise manner.
Cheers,
Clyde
======
SRU Verification:
1. Install nut
2. Run the /etc/init.d/nut status script
3. Check to see if its running by comparing the output of ps auxwww | grep nut
Note: You should have a UPS to test this with.
Related branches
- Steve Beattie (community): Approve (sru)
-
Diff: 33 lines (+10/-3)2 files modifieddebian/changelog (+7/-0)
debian/nut.init (+3/-3)
Changed in nut (Ubuntu Jaunty): | |
assignee: | nobody → Chuck Short (zulcss) |
summary: |
- nut init script reports incorrect status + [SRU]nut init script reports incorrect status |
description: | updated |
$ sudo /etc/init.d/nut status
Checking status of Network UPS Tools
* upsd is not running
* upsmon is not running
[3]
$ ps auxww|grep ups
nut 6701 0.0 0.0 14668 784 ? Ss 08:13 0:00 /lib/nut/usbhid-ups -a myups2
nut 6703 0.0 0.0 14472 640 ? Ss 08:13 0:00 /sbin/upsd
root 6705 0.0 0.0 14436 748 ? Ss 08:13 0:00 /sbin/upsmon
nut 6707 0.0 0.0 14436 716 ? S 08:13 0:00 /sbin/upsmon