From owner-freebsd-questions Fri Oct 24 17:42:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA01650 for questions-outgoing; Fri, 24 Oct 1997 17:42:19 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA01636 for ; Fri, 24 Oct 1997 17:42:12 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.7/8.8.5) id KAA12040; Sat, 25 Oct 1997 10:11:59 +0930 (CST) Message-ID: <19971025101158.09503@lemis.com> Date: Sat, 25 Oct 1997 10:11:58 +0930 From: Greg Lehey To: David K Phinney Cc: FreeBSD-Questions@FreeBSD.ORG Subject: Re: Listing devices in 2.2.x References: <199710241701.KAA27315@lithium.dowco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84e In-Reply-To: <199710241701.KAA27315@lithium.dowco.com>; from David K Phinney on Fri, Oct 24, 1997 at 10:01:59AM -0700 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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