Introduce the option of running fsck -y if the initial preen fails.

Defaults to off.

Obtained from:	Yahoo!
This commit is contained in:
Doug Barton 2001-02-05 04:54:42 +00:00
parent eabf71899f
commit 385a585a4b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72031
3 changed files with 26 additions and 3 deletions

View File

@ -31,6 +31,7 @@ pccardd_flags="" # Additional flags for pccardd.
pccard_conf="/etc/defaults/pccard.conf" # pccardd(8) config file
local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs.
rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails.
##############################################################
### Network configuration sub-section ######################

20
etc/rc
View File

@ -157,8 +157,24 @@ autoboot)
exit 1
;;
8)
echo 'Automatic file system check failed... help!'
exit 1
case ${fsck_y_enable} in
[Yy][Ee][Ss])
echo 'File system preen failed, trying fsck -y . . .'
fsck -y
case $? in
0)
;;
*)
echo 'Automatic file system check failed . . . help!'
exit 1
;;
esac
;;
*)
echo 'Automatic file system check failed . . . help!'
exit 1
;;
esac
;;
12)
echo 'Reboot interrupted'

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd July 3, 2000
.Dd February 4, 2001
.Dt RC.CONF 5
.Os
.Sh NAME
@ -575,6 +575,12 @@ By default, the files specified are
.Pa /etc/rc.conf
and
.Pa /etc/rc.conf.local
.It Ar fsck_y_enable
(bool) if set to
.Ar YES ,
.Xr fsck 8
will be run with the -y flag if the initial preen
of the filesystems fails.
.It Ar syslogd_enable
(bool) If set to
.Ar YES ,