From 46e72594047f32bf470f6ca20938367c79baa8cc Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 3 Jan 2010 04:25:43 +0000 Subject: 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@ --- distrib/miniroot/install.sub | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'distrib/miniroot/install.sub') 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 -- cgit v1.2.3