Subject: Re: Neat feature.
To: Andreas Wrede <andreas@planix.com>
From: None <erh@nimenees.com>
List: current-users
Date: 06/15/2000 18:03:29
On Thu, Jun 15, 2000 at 01:42:28PM -0400, Andreas Wrede wrote:
> On Thu, 15 Jun 2000, Steve Woodford wrote:
>
> Maybe like this:
>
> mv -f /var/log/dmesglog /var/log/dmesglog.0
> dmesg | sed -n '/^NetBSD/h; /^NetBSD/!H; ${ x; p; q; }' \
> > /var/log/dmesglog
hmm.. what does this do? (i'm not up to speed on sed details)
> diff -bc /var/log/dmesglog.0 /var/log/dmesglog > /tmp/diff.$$
> if [ -s /tmp/diff.$$ ]; then
> cat /tmp/diff.$$ | Mail -s "hardware change" root
> fi
> rm -f /tmp/diff.$$
mailing the diffs sounds like a next idea. But you still loose
the old dmesg output the next time you reboot even if the output doesn't
change. If you're going to be creating an old-boot dmesg file you might
as well make it useful. (seen elsewhere: keeping all the previous dmesg's
with rcs might be a little more useful but it seems a bit like overkill)
eric