The service --status-all command is useless

Bug #289671 reported by Laurent Bonnaud
2
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Fix Released
Low
Dustin Kirkland 

Bug Description

The problem is that many init scripts do not support the "status" argument and that useful messages are lost in a flood a error messages:

# service --status-all | grep Usage:
Usage: /etc/init.d/NetworkManager {start|stop|restart|force-reload}
Usage: /etc/dbus-1/event.d/25NetworkManager {start|stop|restart|force-reload}
Usage: /etc/init.d/alsa-utils {start [CARD]|stop [CARD]|restart [CARD]|reset [CARD]}
Usage: /etc/init.d/apport {start|stop|restart|reload|force-reload}
Usage: /etc/init.d/binfmt-support {start|stop|restart|force-reload}
Usage: /etc/init.d/bittorrent {start|stop|restart|force-reload}
Usage: bootmisc.sh [start|stop]
Usage: checkfs.sh [start|stop]
Usage: checkroot.sh [start|stop]
Usage: /etc/init.d/console-setup {start|reload|restart|force-reload|stop}
Usage: /etc/init.d/cpufrequtils {start|stop|restart|reload|force-reload}
Usage: cryptdisks {start|stop|restart|reload|force-reload}
Usage: cryptdisks-early {start|stop|restart|reload|force-reload}
 * Usage: /etc/init.d/dictd {start|stop|restart|reload|force-reload}
Traceback (most recent call last):
  File "/etc/init.d/displayconfig-hwprobe.py", line 27, in <module>
    import ScanPCI
ImportError: No module named ScanPCI
Usage: /etc/init.d/gpsd {start|stop|restart|reload|force-reload}
Usage: /etc/init.d/hddtemp {start|stop|restart|force-reload}
Usage: /etc/init.d/hibernate {start|stop|restart|force-reload}
Usage: hostname.sh [start|stop]
 * Usage: hwclock.sh {start|stop|reload|force-reload|show}
 * Usage: hwclock.sh {start|stop|reload|force-reload|show}
Usage: /etc/init.d/keyboard-setup {start|reload|restart|force-reload|stop}
Usage: /etc/init.d/killprocs start|stop
Usage: /etc/init.d/kqemu-source {start|stop|restart|force-reload}
Usage: /etc/init.d/kvm {start|stop|restart|force-reload}
Usage: /etc/init.d/libpam-foreground {start|stop|restart|force-reload}
Usage: /etc/init.d/linux-restricted-modules-common {start}
 * Usage: /etc/init.d/loadcpufreq {start|stop|restart|force-reload}
Usage: /etc/init.d/loopback {start|stop|restart|force-reload}
Usage: mountall-bootclean.sh [start|stop]
Usage: mountall.sh [start|stop]
Usage: mountdevsubfs [start|stop]
Usage: mountkernfs [start|stop]
Usage: mountnfs-bootclean.sh [start|stop]
Usage: /etc/init.d/mountnfs.sh start|stop
Usage: mountoverflowtmp [start|stop]
Usage: mountall-mtab.sh [start|stop]
Usage: /etc/init.d/netdiag {start|stop|restart}
Usage: /etc/init.d/networking {start|stop|restart|force-reload}
Usage: {start|stop|restart|force-reload}
 * Usage: /etc/init.d/powernowd {start|stop|restart|force-reload}
 * Usage: /etc/init.d/powernowd {start|stop|restart|force-reload}
Usage: /etc/init.d/procps {start|stop|restart|force-reload}
Usage: /etc/init.d/rc.local start|stop
Usage: /etc/init.d/readahead {start|stop|restart|force-reload}
Usage: /etc/init.d/readahead {start|stop|restart|force-reload}
Usage: /etc/init.d/resolvconf {start|stop|reload|restart|force-reload|enable-updates|disable-updates}
Usage: /etc/init.d/rmnologin start|stop
Usage: /etc/init.d/sendsigs start|stop
 * Usage: /etc/init.d/setkey {start|stop|restart|force-reload}
Usage: /etc/init.d/smartmontools {start|stop|restart|reload|force-reload}
 * Usage: /etc/init.d/sysstat {start|stop|restart|reload|force-reload}
 * Usage: /etc/init.d/system-tools-backends {start|stop|restart|force-reload}
Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload}
Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload}
Usage: /etc/init.d/umountfs start|stop
Usage: umountnfs.sh [start|stop]
Usage: /etc/init.d/umountroot start|stop
Usage: /etc/init.d/uptimed {start|stop|restart|force-reload}
Usage: /etc/init.d/uptimed.sh {start|stop|restart|force-reload}
Usage: urandom start|stop
Usage: /etc/init.d/usplash {start|stop}
Usage: /etc/init.d/wpa-ifupdown {start|stop|restart|force-reload}
Usage: /etc/init.d/zope3 {start|stop|restart|force-reload}

Related branches

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I absolutely agree. I have a patch that will filter these.

:-Dustin

Changed in sysvinit:
assignee: nobody → kirkland
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

What do you think about this for output:

$service --status-all
 [ + ] NetworkManager
 [ ? ] acpi-support
 [ + ] acpid
 [ ? ] alsa-utils
 [ - ] anacron
 [ - ] apparmor
 [ ? ] apport
 [ + ] atd
 [ + ] avahi-daemon
 [ ? ] binfmt-support
 [ + ] bluetooth
 [ - ] bootlogd
 [ ? ] bootlogs.sh
 [ ? ] bootmisc.sh
 [ - ] brltty
 [ ? ] checkfs.sh
 [ ? ] checkroot.sh
 [ ? ] console-setup
 [ ? ] cron
 [ ? ] cryptdisks
 [ ? ] cryptdisks-early
 [ + ] cups
 [ + ] dbus
 [ - ] dkms_autoinstaller
 [ ? ] dns-clean
 [ + ] gdm
 [ ? ] glibc.sh
 [ + ] hal
 [ ? ] hostname.sh
 [ ? ] hotkey-setup
 [ ? ] hwclock.sh
 [ ? ] keyboard-setup
 [ ? ] killprocs
 [ + ] klogd
 [ ? ] kvm
 [ - ] laptop-mode
 [ + ] libvirt-bin
 [ ? ] linux-restricted-modules-common
 [ ? ] loopback
 [ ? ] module-init-tools
 [ ? ] mountall-bootclean.sh
 [ ? ] mountall.sh
 [ ? ] mountdevsubfs.sh
 [ ? ] mountkernfs.sh
 [ ? ] mountnfs-bootclean.sh
 [ ? ] mountnfs.sh
 [ ? ] mountoverflowtmp
 [ ? ] mtab.sh
 [ ? ] networking
 [ ? ] pcmciautils
 [ ? ] policykit
 [ - ] postfix
 [ ? ] powernowd
 [ ? ] powernowd.early
 [ ? ] pppd-dns
 [ ? ] procps
 [ ? ] pulseaudio
 [ ? ] rc.local
 [ ? ] readahead
 [ ? ] readahead-desktop
 [ ? ] resolvconf
 [ ? ] rmnologin
 [ - ] rsync
 [ ? ] saned
 [ ? ] screen-cleanup
 [ ? ] sendsigs
 [ - ] skipjack
 [ + ] ssh
 [ ? ] stop-bootlogd
 [ ? ] stop-bootlogd-single
 [ ? ] stop-readahead
 [ + ] sysklogd
 [ + ] system-tools-backends
 [ ? ] udev
 [ ? ] udev-finish
 [ ? ] ufw
 [ ? ] umountfs
 [ ? ] umountnfs.sh
 [ ? ] umountroot
 [ ? ] urandom
 [ ? ] usplash
 [ ? ] vbesave
 [ - ] whereami
 [ ? ] wpa-ifupdown
 [ - ] x11-common

I'm outputting the "unknown" service status (?) on standard err, so you can filter this very easily with:

service --status-all 2>/dev/null
 [ + ] NetworkManager
 [ + ] acpid
 [ - ] anacron
 [ - ] apparmor
 [ + ] atd
 [ + ] avahi-daemon
 [ + ] bluetooth
 [ - ] bootlogd
 [ - ] brltty
 [ + ] cups
 [ + ] dbus
 [ - ] dkms_autoinstaller
 [ + ] gdm
 [ + ] hal
 [ + ] klogd
 [ - ] laptop-mode
 [ + ] libvirt-bin
 [ - ] postfix
 [ - ] rsync
 [ - ] skipjack
 [ + ] ssh
 [ + ] sysklogd
 [ + ] system-tools-backends
 [ - ] whereami
 [ - ] x11-common

:-Dustin

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sysvinit - 2.86.ds1-61ubuntu6

---------------
sysvinit (2.86.ds1-61ubuntu6) jaunty; urgency=low

  * debian/rules: install service.8 manpage to man8 rather than
    man1, LP: #275697
  * debian/patches/94_service.dpatch: make the --status-all command
    useful by filtering unimplemented 'status' actions to stderr, and
    standardize the output to something more readable, LP: #289671

 -- Dustin Kirkland <email address hidden> Sat, 28 Feb 2009 13:17:18 -0600

Changed in sysvinit:
status: In Progress → Fix Released
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote : Re: [Bug 289671] Re: The service --status-all command is useless

On Sat, 2009-02-28 at 19:10 +0000, Dustin Kirkland wrote:
> What do you think about this for output:

This is great. Thank you for the fix!

--
Laurent Bonnaud.
http://www.lis.inpg.fr/pages_perso/bonnaud/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.