From owner-freebsd-bugs Tue Jan 23 23:30:20 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1465F37B6A3 for ; Tue, 23 Jan 2001 23:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0O7U1A82902; Tue, 23 Jan 2001 23:30:01 -0800 (PST) (envelope-from gnats) Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 7CFBC37B69F for ; Tue, 23 Jan 2001 23:24:49 -0800 (PST) Received: from rfx-216-196-73-168.users.reflexcom.com ([216.196.73.168]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Tue, 23 Jan 2001 23:23:01 -0800 Received: (from cjc@localhost) by rfx-216-196-73-168.users.reflexcom.com (8.11.1/8.11.1) id f0O7Otw46375; Tue, 23 Jan 2001 23:24:55 -0800 (PST) (envelope-from cjc) Message-Id: <200101240724.f0O7Otw46375@rfx-216-196-73-168.users.reflexcom.com> Date: Tue, 23 Jan 2001 23:24:55 -0800 (PST) From: "Crist J. Clark" Reply-To: cjc@rfx-216-196-73-168.users.reflexcom.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/24592: dmesg.boot Gets Overwritten without Reboot Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24592 >Category: bin >Synopsis: dmesg.boot Gets Overwritten without Reboot >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 23 23:30:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Crist J. Clark >Release: FreeBSD 4.2-STABLE i386 >Organization: >Environment: Observed on FreeBSD 4.2-STABLE, but older versions and 5.0-CURRENT are also affected. >Description: The file containing the kernel boot messages, /var/run/dmesg.boot, will be overwritten when a user drops into single-user mode and comes back up into multi-user without a reboot. >How-To-Repeat: Drop into single-user mode and then go right back to multi-user. Do not reboot. # ls -l /var/run/dmesg.boot -rw-r--r-- 1 root wheel 3623 Jan 17 19:35 /var/run/dmesg.boot # shutdown now Enter full pathname of shell or RETURN for /bin/sh: # exit # ls -l /var/run/dmesg.boot -rw-r--r-- 1 root wheel 11188 Jan 23 22:05 /var/run/dmesg.boot >Fix: Writing dmesg.boot is in the clean_var funnction of /etc/rc. I am not familiar enough with init(8) and rc(8) to figure out how to let /etc/rc know if we are going into multi-user after a fresh reboot or from single-user without a recent reboot. I see a problem in telling the difference between, reboot -> single-user -> multi-user Versus, multi-user -> single-user -> multi-user That is, what state information can survive the single-user stage. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message