diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-01-03 04:25:43 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-01-03 04:25:43 +0000 |
commit | 46e72594047f32bf470f6ca20938367c79baa8cc (patch) | |
tree | c28c98e64b559c3c67016761081cbc15986bcdbd /distrib/miniroot | |
parent | 4e3552d1b85396a89b2620edc8fea8750c876f1f (diff) |
Since we can now recognize new disks as they appear, loop waiting
for a root disk to appear if no disks are initially found.
Diff & ok from halex@, idea from deraadt@
Diffstat (limited to 'distrib/miniroot')
-rw-r--r-- | distrib/miniroot/install.sub | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index ce041f7fb83..a079c629f24 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.594 2009/07/23 00:30:03 krw Exp $ +# $OpenBSD: install.sub,v 1.595 2010/01/03 04:25:42 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 @@ -1953,10 +1953,11 @@ if [[ $MODE == install ]]; then fi # Get ROOTDISK, ROOTDEV and SWAPDEV. -[[ -n $(get_dkdevs) ]] || { echo "No disks found." ; exit ; } - -ask_which "disk" "is the root disk" '$(get_dkdevs)' -[[ $resp == done ]] && exit +while :; do + ask_which "disk" "is the root disk" '$(get_dkdevs | sed s,^$,none, )' + [[ $resp == done ]] && exit + [[ $resp != none ]] && break +done makedev $resp || exit ROOTDISK=$resp |