summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2001-02-05 04:54:42 +0000
committerdougb <dougb@FreeBSD.org>2001-02-05 04:54:42 +0000
commitd59879728c9e3a732c50a70ba637959a82efd66b (patch)
tree16ba4423fc559c86a545b5331e52cae000c3b4a9 /etc/rc
parentf5aab66f3776c79d592353db9452e9a63b431060 (diff)
downloadFreeBSD-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/rc')
-rw-r--r--etc/rc20
1 files changed, 18 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index fefeed3..3155f34 100644
--- a/etc/rc
+++ b/etc/rc
@@ -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'
OpenPOWER on IntegriCloud