summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2023-06-06 09:35:45 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2023-06-06 09:35:45 +0000
commitbf8a23be44098e4e39faedb17b7818ce2e27ff6c (patch)
treec74675ee0e58b13d9ac7fc4dd31ff8a327904482 /distrib/miniroot
parentfd5ca2f366d8a3c72a4d1972654db3e0b8102206 (diff)
Fold disk crypto question '?' text into prompt
Since this question moved after the root disk one and '?' stopped listing disks, hoist the implementation details in order to drop the custom answer and reuse existing ask_yn(), thus Encrypt the root disk? (yes, no or '?' for details) [no] ? Create a passphrase protected CRYPTO softraid volume to be used as root disk. Encrypt the root disk? (yes, no or '?' for details) [no] becomes Encrypt the root disk? (passphrase CRYPTO softraid) [no] Prodded by afresh1
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sub20
1 files changed, 3 insertions, 17 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 1f4b87c469e..fe1e978f065 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1248 2023/05/24 20:04:05 naddy Exp $
+# $OpenBSD: install.sub,v 1.1249 2023/06/06 09:35:44 kn Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -3075,7 +3075,6 @@ do_autoinstall() {
encrypt_root() {
local _chunk _tries=0
- local _q="Encrypt the root disk? (yes, no or '?' for details)"
[[ $MDBOOTSR == y ]] || return
@@ -3086,21 +3085,8 @@ encrypt_root() {
# e.g. auto-assembled at boot or done in (S)hell.
[[ -z $(get_softraid_volumes) ]] || return
- while :; do
- _ask "$_q" no || continue
- case $resp in
- '?') cat <<'__EOT'
-Create a passphrase protected CRYPTO softraid volume to be used as root disk.
-__EOT
- ;;
- '') ;;
- n|no) return;;
- y|yes) break;;
- *) echo "'$resp' is not a valid choice."
- continue;;
- esac
- done
- log_answers "$_q" "$resp"
+ ask_yn 'Encrypt the root disk? (passphrase CRYPTO softraid)' || return
+
_chunk=$ROOTDISK
echo "\nConfiguring the crypto chunk $_chunk...\n"