[Bug 718013] Re: serivce --status-all reports ? for services that do support "status"

Launchpad Bug Tracker 718013 at bugs.launchpad.net
Sat Oct 22 12:24:01 UTC 2011


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: sysvinit (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sysvinit in Ubuntu.
https://bugs.launchpad.net/bugs/718013

Title:
  serivce --status-all reports ? for services that do support "status"

Status in “sysvinit” package in Ubuntu:
  Confirmed

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:
                          if ! grep -qs "\Wstatus)" "$SERVICE"; then

  $ 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}/${SERVICE}" ]; then
  -                        if ! grep -qs "\Wstatus)" "$SERVICE"; then
  +                        if ! egrep -qs "\Wstatus\)|^status\)" "$SERVICE"; then
                             #printf " %s %-60s %s\n" "[?]" "$SERVICE:" "unknown" 1>&2
                             echo " [ ? ]  $SERVICE" 1>&2
                             continue

  New behavior:

  $ /tmp/service  --status-all 2>&1 | grep myth
   [ + ]  mythtv-backend

  
  Thanks.  Hopefully this is enough info.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/718013/+subscriptions




More information about the foundations-bugs mailing list