serivce --status-all reports ? for services that do support "status"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: sysvinit
I get a lot of question marks when I run "service --status-all", even for things that i know support status through the script in init.d. Some debugging:
$ lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10
This doesn't work properly:
$ service --status-all 2>&1 | grep myth
[ ? ] mythtv-backend
This is how it decides to print a question mark:
$ grep "\Wstatus)" mythtv-backend
$
But....
$ grep ^status mythtv-backend
status)
$
A quick hack fix:
$ diff -u `which service` /tmp/service
--- /usr/sbin/service 2010-11-01 11:36:01.000000000 -0500
+++ /tmp/service 2011-02-12 23:22:46.000000000 -0600
@@ -74,7 +74,7 @@
*)
if ! is_ignored_file "${SERVICE}" \
&& [ -x "${SERVICEDIR}
- if ! grep -qs "\Wstatus)" "$SERVICE"; then
+ if ! egrep -qs "\Wstatus\
New behavior:
$ /tmp/service --status-all 2>&1 | grep myth
[ + ] mythtv-backend
Thanks. Hopefully this is enough info.
Status changed to 'Confirmed' because the bug affects multiple users.