summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorAlexander Hall <halex@cvs.openbsd.org>2013-11-28 22:31:08 +0000
committerAlexander Hall <halex@cvs.openbsd.org>2013-11-28 22:31:08 +0000
commit585cb9306e11d7bf8bb0b6bb91a8ba45516a0d2a (patch)
tree995dfb4e575d07d7c5310ac7bab4bb39ff696131 /distrib/miniroot/install.sub
parent37b33193cb69cbb3c18113ceb1e311f4c93f394f (diff)
make ask_which bail out on a missing response in the autoinstall case
rather than looping endlessly. ok rpe@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub7
1 files changed, 5 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index f3babec1740..b24d0f2ab43 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.703 2013/11/28 21:20:40 rpe Exp $
+# $OpenBSD: install.sub,v 1.704 2013/11/28 22:31:07 halex 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
@@ -396,8 +396,11 @@ user_setup() {
# Save the user input (or the default) in $resp.
function ask_until {
resp=
- while [[ -z $resp ]] ; do
+ while true; do
ask "$1" "$2"
+ [[ -n $resp ]] && break
+ echo "A response is required."
+ $auto && exit 1
done
}