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

Re: Log handling



Colin Watson wrote:
> Once di-utils 1.13 makes it into initrds, I'd like to start converting
> udebs to use this. I think it would be reasonable to leave just the
> debootstrap log in /var/log/messages so that it shows up on tty3, and
> send pretty much everything else to tty4.

I've done a pass through the tree and fixed most everything that
wrote to /var/log/messages to log to syslog, mostly using log-output.
Haven't uploaded the udebs yet.

(I find it's easy to forget to pass the first parameter to log-output,
at least early in the morning. I hope I caught all such mistakes.)

I left base-installer alone, however I don't know if there's any point
in making it be a special case. To the user reading the logs it's not
differentiable from the rest of the installer; developers reading the
logs should find it easy to find the debootstrap bits.

Also, converting this in localechooser to use log-output has defeated
me:

if chroot /target/ /usr/sbin/validlocale $LOCALE \
    >> /target/etc/locale.gen 2>> $LOG ; then

And this kind of thing is made perhaps a bit too hard to do with
log-output, so I left some instances of it unchanged in partconf and
partman-*:

mkswap %s >/dev/null 2>>/var/log/messages

Also, I'm not sure if log-output is intended to be able to take
arbitrary shell expressions as arguments, or just a simple program+args.
The current implementation might(?) allow the former but the docs
suggest it might be intended to be limited to the latter, so I didn't
feel comfortable converting this bit in preseed to use it yet, since
$command can be an arbitrary shell expression.

        eval $command >>/var/log/messages 2>&1 || code=$?
	
-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: