summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2023-08-21 14:33:56 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2023-08-21 14:33:56 +0000
commitc7bc31c0ed1afd8585be277c7b4fbba94e9e6059 (patch)
treefe4a00c570c9f2e351026733c479828ca1482641
parent9e666fe166ef7091baafbf5cf4e0518dae23e131 (diff)
No need to make_dev() existing root device in disk crypto question
Since r1.1245 encrypt_root() happens immediately after get_rootinfo(). the latter creates device files for the root disk (and aborts if make_dev() fails), so encrypt_root()'s call on the softraid chunk is purely redundant. Hoist _chunk definition into declaration while here.
-rw-r--r--distrib/miniroot/install.sub7
1 files changed, 2 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 51f0828534d..73ff787e662 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1254 2023/08/21 08:59:18 kn Exp $
+# $OpenBSD: install.sub,v 1.1255 2023/08/21 14:33:55 kn Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -3075,7 +3075,7 @@ do_autoinstall() {
}
encrypt_root() {
- local _chunk
+ local _chunk=$ROOTDISK
[[ $MDBOOTSR == y ]] || return
@@ -3090,10 +3090,7 @@ encrypt_root() {
ask_yn 'Encrypt the root disk with a passphrase?' || return
- _chunk=$ROOTDISK
echo "\nConfiguring the crypto chunk $_chunk...\n"
-
- make_dev $_chunk
md_prep_fdisk $_chunk
echo 'RAID *' | disklabel -w -A -T- $_chunk