[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#169600: Policy should mandate a place for init.d script to log errors to



Package: debian-policy
Version: 3.5.7.1
Severity: wishlist

Currently the Debian policy mandates regarding scripts a few conventions
including which arguments to accept and how to ouput the results:

http://www.debian.org/doc/debian-policy/ch-opersys.html#s10.4

However, even if it's common sense, it might be necessary to introduce
also a convention regarding error checking and logging. Many maintainers 
are getting used (and I see this from init.d scripts derived from
RedHat packages' code) to *not* check errors at all. Maintainers are
sometimes sending output to /dev/null in order to not taint the console's
output which might lead to the user not being aware of problems/issues
when a script is run. Some maintainers are doing it properly (and sending
a 'failed' to console when it cannot start) and some are not. However even
in the previous case, the user might want to dig into the problem in order
to see what/why has failed.

IMHO the policy should mandate that error checking be done and any errors
be sent in "not verbose" format to the console (...failed) and in verbose
format to some log (which should be of course logrotated but that'0s
another issue). 

The location of this log (/var/log/messages or a new one
/var/log/init.d.log?) should be specified in this policy too. Any
errors/messages from the init.d scripts should be sent there. This makes
it easier for users to know why a given service has failed in case the
system starts up unattended (and thus nobody looks at the console) or it
lacks console at all.

Regards

Javi

Attachment: pgpCVCHni17um.pgp
Description: PGP signature


Reply to: