summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-06-01 02:57:41 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-06-01 02:57:41 +0000
commit425123cde87c7de72d75dec69c1ac4879f8f9501 (patch)
tree3e388c9d8004e4bb0fb4ad2fa7feaf17f78a7fdd /distrib/miniroot
parent947bb1c4b83c1e06ba6067d56863ff6e8bf875e6 (diff)
Test the return value of md_prep_disklabel() to detect failed
attempts to write a disklabel. When failure is detected don't configure the disk, return it to the list of disks available to be configured.
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index f7a28c63d05..4c2574e5921 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sh,v 1.197 2009/05/31 18:38:42 deraadt Exp $
+# $OpenBSD: install.sh,v 1.198 2009/06/01 02:57:40 krw Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -94,7 +94,7 @@ if [[ ! -f /etc/fstab ]]; then
# fstab.$DISK is created here with 'disklabel -f'.
rm -f *.$DISK
AUTOROOT=n
- md_prep_disklabel $DISK
+ md_prep_disklabel $DISK || { DISK= ; continue ; }
# Make sure there is a '/' mount point.
grep -qs " / ffs " fstab.$ROOTDISK || \