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

Re: PROPOSAL: dpkg-logger and related

Ben Collins wrote:
> Example logging script (modifed from the one above):
> # postinst for package foo
> if [ -f /etc/foo.conf ]
> then
>         dpkg-logger --stdout 'foo' 'info' Configuration file already \
>               present, you may wish to check it's contents
> fi
> #end postinst for package foo
> The second script will do 2 things, add the message to the logging facility
> provided by dpkg-logger and send the output to stdout for the user to see.

How do you reconsile such output with debian policy, which states:

     If a package has a vitally important piece of information to pass to
     the user (such as "don't run me as I am, you must edit the following
     configuration files first or you risk your system emitting
     badly-formatted messages"), it should display this in the postinst'
     script and prompt the user to hit return to acknowledge the message.
     Copyright messages do not count as vitally important (they belong in
     /usr/doc/<package>/copyright'); neither do instructions on how to use a
     program (these should be in on line documentation, where all the users
     can see them).

If the above message is important, policy requires that the postinst pause
until the user hits return.

If the above message is not important, policy prohibts the package from
outputting it.

One fix would be to make dpkg-logger pause after outputting any messages to

> Syslog is already a proven and stable package

Syslog can be configured to send messages via UDP to a central server, in
such a setup, it is not guarenteed that the messages will ever be tranmitted
if there is a network problem or server outage. This is generally acceptable
for normal types of log output, but not for the new purpose you are using
syslog for, not for the sending of vital information the admin must see.

Granted, the above configuration is not the default one, but many sites use

Also, during a normal upgrade that includes sysklogd, syslog may not be
running while several other package's postint's are run. In such a case, any
messages would be lost.

Also, what about people starting up a system in single user mode, when
syslogd is not running, and installing a package. Again, messages would be

Finally, I have qualms about this whole design in general. You don't seem to
have considered how this is supposed to mesh with the configuration
management system we will (hopefully) be implmenting in the future.

see shy jo

Reply to: