summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-07-09 15:15:38 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-07-09 15:15:38 +0000
commitc23df527ef17a90c32d0c5a4f395f357f8ded036 (patch)
treea276318dee66fd360ebde9df022b030ebb1ef597 /distrib/miniroot
parent2dd7d9a84cd935a06337c3a4c0b7bd29b52ef91a (diff)
Don't do needless sync and change -fast to -check in unmount_fs()
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sub33
-rw-r--r--distrib/miniroot/upgrade.sh4
2 files changed, 14 insertions, 23 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index f2a7b40d018..b62ea3613ad 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sub,v 1.36 1997/05/29 09:15:47 niklas Exp $
+# $OpenBSD: install.sub,v 1.37 1997/07/09 15:15:37 millert Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -1627,16 +1627,16 @@ __mount_filesystems_1
unmount_fs()
{
# Unmount all filesystems and check their integrity.
- # Usage: [-fast] <fstab file>
- local _fast
+ # Usage: [-check] <fstab file>
+ local _check
local _fstab
local _pid
- if [ "$1" = "-fast" ]; then
- _fast=1
+ if [ "$1" = "-check" ]; then
+ _check=1
_fstab=$2
else
- _fast=0
+ _check=0
_fstab=$1
fi
@@ -1645,14 +1645,6 @@ unmount_fs()
return
fi
- if [ $_fast = 0 ]; then
- echo -n "Syncing disks..."
- #_pid=`twiddle`
- sync; sleep 4; sync; sleep 2; sync; sleep 2
- #kill $_pid
- echo "done."
- fi
-
(
_devs=""
_mps=""
@@ -1669,14 +1661,13 @@ unmount_fs()
done
echo "Done."
- if [ $_fast = 0 ]; then
- exit
+ if [ $_check = 1]; then
+ echo "Checking filesystem integrity..."
+ for _dev in ${_devs}; do
+ echo "${_dev}"
+ fsck -f ${_dev}
+ done
fi
- echo "Checking filesystem integrity..."
- for _dev in ${_devs}; do
- echo "${_dev}"
- fsck -f ${_dev}
- done
echo "Done."
) < $_fstab
}
diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh
index 4204e30b02d..df1fef1a5c9 100644
--- a/distrib/miniroot/upgrade.sh
+++ b/distrib/miniroot/upgrade.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: upgrade.sh,v 1.7 1997/05/14 21:22:07 millert Exp $
+# $OpenBSD: upgrade.sh,v 1.8 1997/07/09 15:15:35 millert Exp $
# $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
ROOTDISK="" # filled in below
-trap "unmount_fs -fast /tmp/fstab.shadow > /dev/null 2>&1; rm -f /tmp/fstab.shadow" 0
+trap "unmount_fs -check /tmp/fstab.shadow > /dev/null 2>&1; rm -f /tmp/fstab.shadow" 0
MODE="upgrade"