From foxfair@news.ks.edu.tw Fri May  7 21:26:09 1999
Return-Path: <foxfair@news.ks.edu.tw>
Received: from news.ks.edu.tw (news.ks.edu.tw [163.16.1.11])
	by hub.freebsd.org (Postfix) with ESMTP id 6E5A115662
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 May 1999 21:26:00 -0700 (PDT)
	(envelope-from foxfair@news.ks.edu.tw)
Received: (from root@localhost)
	by news.ks.edu.tw (8.9.3/8.9.2) id MAA00435;
	Sat, 8 May 1999 12:14:47 +0800 (CST)
	(envelope-from foxfair)
Message-Id: <199905080414.MAA00435@news.ks.edu.tw>
Date: Sat, 8 May 1999 12:14:47 +0800 (CST)
From: Foxfair Hu <foxfair@news.ks.edu.tw>
Reply-To: foxfair@news.ks.edu.tw
To: FreeBSD-gnats-submit@freebsd.org
Subject: Automatically run fsck when the file system is not clean.
X-Send-Pr-Version: 3.2

>Number:         11569
>Category:       misc
>Synopsis:       Automatically run fsck when the file system is not clean.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May  7 21:30:01 PDT 1999
>Closed-Date:    Sat Mar 18 18:51:40 PST 2000
>Last-Modified:  Sat Mar 18 18:53:38 PST 2000
>Originator:     Foxfair Hu
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:
Both FreeBSD 4.0-CURRENT and 3.1-STABLE.

>Description:
When the system crashed, and reboot immediately, the file system often
states in "not-clean". This patch can run `fsck -y` automatically w/o
get into single user mode or type command under comman prompt #.

>How-To-Repeat:
Try to let your system burn with fire and reboot, you'll see it.

>Fix:
Apply this patch to /usr/src/etc/rc.
Obtained from : Taiwan FreeBSD newsgroup.
Submitted by :	<unixer.bbs@bbs.ee.ncku.edu.tw>
================== Cut Here ============================
--- rc.org      Sat May  8 11:58:40 1999
+++ rc  Sat May  8 12:00:11 1999
@@ -60,7 +60,7 @@
        0)
                ;;
        2)
-               exit 1
+               fsck -y; exit 0
                ;;
        4)
                reboot
================== Patch End ==========================

>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: foxfair@news.ks.edu.tw, FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: misc/11569: Automatically run fsck when the file system is not clean.
Date: Sat, 8 May 1999 16:56:43 +1000

 >>Description:
 >When the system crashed, and reboot immediately, the file system often
 >states in "not-clean". This patch can run `fsck -y` automatically w/o
 >get into single user mode or type command under comman prompt #.
 
 This is intentional.  fsck -p fixes everything that is safe to fix
 automatically, then exits with a special status (2) to tell /etc/rc that
 the boot should fail.
 
 >>Fix:
 
 >Apply this patch to /usr/src/etc/rc.
 >Obtained from : Taiwan FreeBSD newsgroup.
 >Submitted by :	<unixer.bbs@bbs.ee.ncku.edu.tw>
 >================== Cut Here ============================
 >--- rc.org      Sat May  8 11:58:40 1999
 >+++ rc  Sat May  8 12:00:11 1999
 >@@ -60,7 +60,7 @@
 >        0)
 >                ;;
 >        2)
 >-               exit 1
 >+               fsck -y; exit 0
 >                ;;
 >        4)
 >                reboot
 >================== Patch End ==========================
 
 If you want to force a check, at least don't ignore errors from fsck -y.
 
 Bruce
 
State-Changed-From-To: open->closed 
State-Changed-By: foxfair 
State-Changed-When: Sat Mar 18 18:51:40 PST 2000 
State-Changed-Why:  
bde had told me an acceptable reason to close this PR/ 
>Unformatted:
