From jesper@skriver.dk Mon Nov  8 18:23:23 1999
Return-Path: <jesper@skriver.dk>
Received: from freesbee.wheel.dk (freesbee.wheel.dk [193.162.159.97])
	by hub.freebsd.org (Postfix) with ESMTP id 3F634150D1
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Nov 1999 18:23:17 -0800 (PST)
	(envelope-from jesper@skriver.dk)
Received: by freesbee.wheel.dk (Postfix, from userid 1001)
	id 9B5E43E31; Tue,  9 Nov 1999 03:23:13 +0100 (CET)
Message-Id: <19991109022313.9B5E43E31@freesbee.wheel.dk>
Date: Tue,  9 Nov 1999 03:23:13 +0100 (CET)
From: jesper@skriver.dk
Reply-To: jesper@skriver.dk
To: FreeBSD-gnats-submit@freebsd.org
Subject: fsck unattended at bootup
X-Send-Pr-Version: 3.2

>Number:         14791
>Category:       conf
>Synopsis:       Optionally change the behaviour of fsck upon bootup.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov  8 19:20:00 PST 1999
>Closed-Date:    Sat Jun 16 19:33:53 PDT 2001
>Last-Modified:  Sat Jun 16 19:34:24 PDT 2001
>Originator:     Jesper Skriver
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Tele Danmark
>Environment:

	Any box running FreeBSD at a remote site.

>Description:

	At a remote site, where there is no one to operate the box, there is no
reason to drop into single user mode, to do a manual fsck, better hope for the 
best and do a 'fsck -y'

>How-To-Repeat:

	NA

>Fix:
	
	Proposed change/addition to /etc/rc and /etc/defaults/rc.conf (diff relative to -CURRENT as of Nov 8th 1999)


--- /etc/rc.orig	Tue Nov  9 03:00:10 1999
+++ /etc/rc	Tue Nov  9 02:57:46 1999
@@ -58,7 +58,17 @@
 
 case $1 in
 autoboot)
-	echo Automatic reboot in progress...
+	case ${fsck_unattended} in
+	[Yy][Ee][Ss])
+		echo Automatic reboot in progress... (unattended)
+		fsck -p || fsck -y
+                ;;
+	[Nn][Oo])
+		echo Automatic reboot in progress...
+		fsck -p
+		;;
+        esac
+
 	fsck -p
 	case $? in
 	0)


--- /etc/defaults/rc.conf.orig	Tue Nov  9 02:59:52 1999
+++ /etc/defaults/rc.conf	Tue Nov  9 03:12:06 1999
@@ -225,6 +225,10 @@
 kern_securelevel="-1"	# range: -1..3 ; `-1' is the most insecure
 update_motd="YES"	# update version info in /etc/motd (or NO)
 start_vinum=""		# set to YES to start vinum
+fsck_unattended="NO"	# If set to YES, /etc/rc will do a 'fsck -p || fsck -y'
+			# instead of the normal 'fsck -p'
+			# NOTE: This can be dangerous, don't do it unless you know 
+			# what you are doing !!
 
 ##############################################################
 ### Allow local configuration override at the very end here ##

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Sat Jun 16 19:33:53 PDT 2001 
State-Changed-Why:  
This exists in the form of fsck_y_enable. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14791 
>Unformatted:
