Date: Sat, 25 Oct 1997 10:11:58 +0930 From: Greg Lehey <grog@lemis.com> To: David K Phinney <dphinney@dowco.com> Cc: FreeBSD-Questions@FreeBSD.ORG Subject: Re: Listing devices in 2.2.x Message-ID: <19971025101158.09503@lemis.com> In-Reply-To: <199710241701.KAA27315@lithium.dowco.com>; from David K Phinney on Fri, Oct 24, 1997 at 10:01:59AM -0700 References: <199710241701.KAA27315@lithium.dowco.com>
index | next in thread | previous in thread | raw e-mail
On Fri, Oct 24, 1997 at 10:01:59AM -0700, David K Phinney wrote:
> Hello,
>
> How does one go about listing configured devices in FreeBSD 2.2, it
> seems 2.1's `lsdev' command is no longer supported. (It hasn't been
> updated by CVSup in a while, and when I run it I get an error about
> hw.devconf.number not existing.) I can't use `dmesg' to see what it
> said at boot-up, because those messages have long since been pushed
> out of the buffer.
>
> Please mail your answers to me directly. Thanks!
In my system /etc/rc, I have:
# Get the config changes
# Do this before we clean out /var/run
dmesg > /var/tmp/dmesg.boot
cmp /var/run/dmesg.boot /var/tmp/dmesg.boot >/dev/null 2>/dev/null
if [ $? -ne 0 ]; then
echo '+++ Configuration changed:'
diff -wu /var/run/dmesg.boot /var/tmp/dmesg.boot >/var/tmp/foobar
cp -p /var/run/dmesg.boot /var/tmp/dmesg.boot2
fi
(cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; })
# Now save /var/run/dmesg.boot
mv /var/tmp/dmesg.boot /var/run/dmesg.boot
This is roughly what BSDI do: it saves a copy of the dmesg output in
/var/run/dmesg.boot, so you can access it any time.
Greg
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971025101158.09503>
