rc scripts and stderr
Tom Van Looy
tom at ctors.net
Mon Dec 1 22:34:33 UTC 2008
Hi
$ sudo service --status-all 2>/dev/null | grep -i usage
Usage: /etc/init.d/console-setup {start|reload|restart|force-reload|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/linux-restricted-modules-common {start}
Usage: /etc/init.d/loopback {start|stop|restart|force-reload}
Usage: /etc/init.d/networking {start|stop|restart|force-reload}
Usage: /etc/init.d/openbsd-inetd {start|stop|reload|force-reload|restart}
Usage: /etc/init.d/readahead {start|stop|restart|force-reload}
Usage: /etc/init.d/readahead {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}
Some tools print their "usage" to stderr, some tools print to stdout. I
don't like to see "Usage" prints on stdout. Because, that kinda screws
up the --status-all output. Isn't there some kind of standard (like LSB)
that, ideally, should be followed?
I'm just digging into Ubuntu so I'm pretty new at how things are rolled
in Linux land. But this seems not right ... Is someone thinking about
solving this? It seems the work is in changing all the rc scripts in
packages so that they act in a uniform way (maybe add a "status" option
to all of them too). I know bash so I could submit some patches :-)
And now that I'm asking. What are the prefered CLI tools (that come with
the base system) to manage the rc scripts? Or am I supposed to just edit
the files.
Kind regards,
Tom
More information about the Ubuntu-devel-discuss
mailing list