Re: sanity check in init.d
>> "MB" == Martin Bialasinski <firstname.lastname@example.org> writes:
>> "SG" == Steve Greenland <email@example.com> writes:
SG> Daemons *should* (I think) log their startup (or failure to do so)
SG> in /var/log/daemon.log (or whereever daemon.* is configured to
MB> Yes, Shaul also pointed this out. I had the analogy of usual
MB> commands in mind (no output = no error).
Another thing comes to my mind (as I took another look at the init.d
They already report different kind of errors on start-up.
if [ ! -e /lib/modules/`uname -r`/fs/autofs.o ]; then
echo "Error: autofs support not available."
if [ "$IFACE" = "none" ] ; then
echo "DHCP client daemon is disabled."
if [ "$(id -u)" != "0" ]
echo "You must be root to start, stop or restart gpm."
if [ "`whoami`" != "root" ]
echo "You must be root to start, stop or restart mysqld."
These messages are a good thing IMHO. But we have to be
consistent. Either we don´t show any messages on failure or we show
messages on any failure (my preference).
With the current situation, the user can´t be sure about success or
failure. Some give error messages, some not... This is not good.
We should issue such messages to STDOUT. Messages by the daemon (*after*
it got started by the start-stop-daemon) should go to syslog.