summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-03-16 22:33:40 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-03-16 22:33:40 +0000
commitd4b485062217e38c8b7ba97c5107d0d7b50908d1 (patch)
tree3f6e6ea5887954efd2081160ff0f3e6d059fc1b5 /distrib
parentbfa36cc5a14826af5e11edb51bcced3354b61eb3 (diff)
Give the upgrader an option to *not* fsck -f non-root filesystems. In
fact make that the default. Help upgraders with big filesystems and no patience. Suggested by & ok beck@.
Diffstat (limited to 'distrib')
-rw-r--r--distrib/miniroot/install.sub13
1 files changed, 6 insertions, 7 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 86269db7aeb..8dfb53e96e7 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.412 2007/03/13 00:14:21 krw Exp $
+# $OpenBSD: install.sub,v 1.413 2007/03/16 22:33:39 krw Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2007 Todd Miller, Theo de Raadt, Ken Westerback
@@ -1437,9 +1437,10 @@ __EOT
#
# Exit if any fsck's fail (but do them all before exiting!).
check_fs() {
- local _dev _mp _fstype _rest _fail
+ local _dev _mp _fstype _rest _fail _f
- echo "Checking non-root filesystems..."
+ ask_yn "Force checking of non-root filesystems?"
+ [[ $resp == y ]] && _f=-f
while read _dev _mp _fstype _rest; do
[ "$_dev" != /dev/"$ROOTDEV" ] || continue
@@ -1447,8 +1448,8 @@ check_fs() {
# Make sure device exists before fsck'ing it.
_rest=${_dev#/dev/}
makedev ${_rest%[a-p]} || continue
- echo -n "fsck -p ${_dev}..."
- if ! fsck -fp ${_dev} >/dev/null 2>&1; then
+ echo -n "fsck -${_f}p $_dev..."
+ if ! fsck -${_f}p $_dev >/dev/null 2>&1; then
echo "FAILED. You must fsck $_dev manually."
_fail=y
else
@@ -1456,8 +1457,6 @@ check_fs() {
fi
done </etc/fstab
- echo "...done."
-
[ "$_fail" ] && exit
}