From: kn Date: Mon, 21 Aug 2023 14:33:55 +0000 (+0000) Subject: No need to make_dev() existing root device in disk crypto question X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2989f6b14c3af92d2e5e9204eed8771f08917543;p=openbsd 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. --- 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 @@ -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