svn commit: r193944 - in head/etc: defaults rc.d

Andriy Gapon avg at FreeBSD.org
Wed Jun 10 19:03:24 UTC 2009


Author: avg
Date: Wed Jun 10 19:03:23 2009
New Revision: 193944
URL: http://svn.freebsd.org/changeset/base/193944

Log:
  rc.d/fsck: allow additional options for fsck_y_enable via fsck_y_flags
  
  Primary intention is to allow to pass -C option to avoid (re-)checking
  clean filesystems when preening fails and fsck -y kicks in.
  
  Submitted by:	marck
  Reviewed by:	current@
  Approved by:	jhb (mentor)
  MFC after:	1 week

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/fsck

Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf	Wed Jun 10 19:02:54 2009	(r193943)
+++ head/etc/defaults/rc.conf	Wed Jun 10 19:03:23 2009	(r193944)
@@ -83,6 +83,7 @@ geli_swap_flags="-e aes -l 256 -s 4096 -
 
 root_rw_mount="YES"	# Set to NO to inhibit remounting root read-write.
 fsck_y_enable="NO"	# Set to YES to do fsck -y if the initial preen fails.
+fsck_y_flags=""		# Additional flags for fsck -y
 background_fsck="YES"	# Attempt to run fsck in the background where possible.
 background_fsck_delay="60" # Time to wait (seconds) before starting the fsck.
 netfs_types="nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems.

Modified: head/etc/rc.d/fsck
==============================================================================
--- head/etc/rc.d/fsck	Wed Jun 10 19:02:54 2009	(r193943)
+++ head/etc/rc.d/fsck	Wed Jun 10 19:03:23 2009	(r193944)
@@ -44,8 +44,8 @@ fsck_start()
 			;;
 		8)
 			if checkyesno fsck_y_enable; then
-				echo "File system preen failed, trying fsck -y."
-				fsck -y
+				echo "File system preen failed, trying fsck -y ${fsck_y_flags}"
+				fsck -y ${fsck_y_flags}
 				case $? in
 				0)
 					;;


More information about the svn-src-head mailing list