Date: 05 Oct 2001 00:43:47 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: cjclark@alum.mit.edu Cc: freebsd-audit@FreeBSD.ORG Subject: Re: dmesg.boot Gets Overwritten without Reboot Message-ID: <xzp1ykjc9gc.fsf@flood.ping.uio.no> In-Reply-To: <20011004152541.I297@blossom.cjclark.org> References: <20011003221310.Q8391@blossom.cjclark.org> <xzpelojfwdk.fsf@flood.ping.uio.no> <20011004152541.I297@blossom.cjclark.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"Crist J. Clark" <cristjc@earthlink.net> writes: > On Thu, Oct 04, 2001 at 02:00:23PM +0200, Dag-Erling Smorgrav wrote: > > Is there any way you can compare the timestamp on /var/run/dmesg.boot > > with `sysctl -n kern.boottime`? This would DTRT in almost all cases > > (the exception being the case where you set the clock back before > > returning from single-user mode) > Right, but is there a more graceful way than [...] Recent FreeBSD versions of find(1) have a -newerXY operator that will DTRT if X=m and Y=t: $ find /var/run -type f -name dmesg.boot -newermt "$(sysctl -n kern.boottime | sed 's/.*}//')" /var/run/dmesg.boot If find(1) outputs "/var/run/dmesg.boot", do nothing - otherwise, create the file. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp1ykjc9gc.fsf>