diff options
author | dougb <dougb@FreeBSD.org> | 2001-02-05 04:54:42 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2001-02-05 04:54:42 +0000 |
commit | d59879728c9e3a732c50a70ba637959a82efd66b (patch) | |
tree | 16ba4423fc559c86a545b5331e52cae000c3b4a9 /etc | |
parent | f5aab66f3776c79d592353db9452e9a63b431060 (diff) | |
download | FreeBSD-src-d59879728c9e3a732c50a70ba637959a82efd66b.zip FreeBSD-src-d59879728c9e3a732c50a70ba637959a82efd66b.tar.gz |
Introduce the option of running fsck -y if the initial preen fails.
Defaults to off.
Obtained from: Yahoo!
Diffstat (limited to 'etc')
-rw-r--r-- | etc/defaults/rc.conf | 1 | ||||
-rw-r--r-- | etc/rc | 20 |
2 files changed, 19 insertions, 2 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 7fd9a527..6e2775a 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -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 ###################### @@ -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' |