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.
#!/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>
}
encrypt_root() {
- local _chunk
+ local _chunk=$ROOTDISK
[[ $MDBOOTSR == y ]] || return
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