Subject: Re: rc.d boot log [was: Re: Cosmetic changes to rc.d scripts]
To: Mike M. Volokhov <email@example.com>
From: mouss <firstname.lastname@example.org>
Date: 10/15/2004 18:46:27
Mike M. Volokhov wrote:
> However, I meant a single log, i.e. when at a boot time the output will
> grew too much (for example up to few megabytes). In this case variables
> will store huge sets of data. Is it ok?
I tested your modifs with a dummy script (that outputs about 20M) and
noticed no special problem (except that _rclogbuf initialization causes
a blank line to be appended but that's not a serious problem). However,
this may be an issue for small systems.
Now there is a third approach: add an rc.d/rclog script that is run
after /var and /usr are mounted, and that changes the behaviour of
rclog() to use tee instead of buffering.
One potential issue with buffering is that output is printed after the
script terminates. If the script is verbose (that's bad but...), it's
output is delayed and once the script terminates, you get it all at
once. Fortunately, the log is here!
PS. shutdown log should go to another place (shutdown.log?).
Otherwise, it gets moved to rc.prev after reboot, so you lose the
previous startup logs (which may be useful for comparisons).