summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2009-07-23 00:30:03 +0000
committerkrw <krw@openbsd.org>2009-07-23 00:30:03 +0000
commitfddfa6bd002fb43ee7fd02fb50b55032aadb2987 (patch)
treee05e4eaed648664d1abe0cfc26a8f7b724ae7eec
parentcomment fix from Brad; OpenBSD's mii_phy_add_media() does not print (diff)
downloadwireguard-openbsd-fddfa6bd002fb43ee7fd02fb50b55032aadb2987.tar.xz
wireguard-openbsd-fddfa6bd002fb43ee7fd02fb50b55032aadb2987.zip
Don't use the presence of /etc/fstab to determine if all filesystems
are umount'd at the start of install/upgrade. As halex@ pointed out 'umount -af' doesn't actually use /etc/fstab, so just always do it. Fixes situations where bailing out of install/upgrade before /etc/fstab was created meant filesystems were not umount'd and restarting the install/upgrade would fail. Noticed & prodded deraadt@
-rw-r--r--distrib/miniroot/install.sub5
1 files changed, 2 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index fd7c7cc4133..ce041f7fb83 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.593 2009/07/14 23:45:16 krw Exp $
+# $OpenBSD: install.sub,v 1.594 2009/07/23 00:30:03 krw Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -1914,8 +1914,7 @@ export EDITOR COLUMNS
# umount all filesystems, just in case we are re-running install or upgrade.
cd /
-[[ -f /etc/fstab ]] && umount -af 1>/dev/null 2>&1
-umount /mnt 1>/dev/null 2>&1
+umount -af 1>/dev/null 2>&1
cat <<__EOT
At any prompt except password prompts you can escape to a shell by