diff options
author | 2013-12-05 00:44:49 +0000 | |
---|---|---|
committer | 2013-12-05 00:44:49 +0000 | |
commit | 589e45b9d32f0c641b0f55958b929fed8574809c (patch) | |
tree | 5fce30dee00a9198173a6b02fce8cd4bca538f08 | |
parent | committing uwe's autoinstall notes, as requested by deraadt; (diff) | |
download | wireguard-openbsd-589e45b9d32f0c641b0f55958b929fed8574809c.tar.xz wireguard-openbsd-589e45b9d32f0c641b0f55958b929fed8574809c.zip |
improve the question part (second line) of ask_which to actually include
the name of what we're asking for, rather than 'Which _one_ ...'
Improves things a lot for the autoinstaller.
ok rpe@
-rw-r--r-- | distrib/miniroot/install.sub | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 57dd3896871..d8e6298583d 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.712 2013/12/04 21:21:35 halex Exp $ +# $OpenBSD: install.sub,v 1.713 2013/12/05 00:44:49 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 @@ -441,7 +441,7 @@ ask_yn() { # # At exit $resp holds selected item, or 'done' ask_which() { - local _name=$1 _query=$2 _list=$3 _def=$4 _dynlist _dyndef _key + local _name=$1 _query=$2 _list=$3 _def=$4 _dynlist _dyndef _key _q _key=$(echo "$_name" | sed 's/[^[:alnum:]]/_/g') @@ -458,9 +458,9 @@ ask_which() { : ${_dyndef:=$1} echo "Available ${_name}s are: $_dynlist." - echo -n "Which one $_query? (or 'done') " - [[ -n $_dyndef ]] && echo -n "[$_dyndef] " - if _autorespond "${_name}s" done; then + _q="Which $_name $_query?" + echo -n "$_q (or 'done') ${_dyndef:+[$_dyndef] }" + if _autorespond "$_q" done; then eval ": \${ask_which_resp_$_key=\"\$resp done\"}" eval "set -- \$ask_which_resp_$_key" resp=$1; shift |