summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-09-14 10:06:15 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-09-14 10:06:15 +0000
commitcc42938a85818d13f82fba51de0c067b707eba9d (patch)
tree0c60a6558e4b6292130c2d6bfa2fe2c8d14db40d /regress
parent52dbd32e31fc864538d9dbfa81a123914cf45f61 (diff)
Fold vnd disk setup targets into a single loop
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.sbin/installboot/Makefile20
1 files changed, 2 insertions, 18 deletions
diff --git a/regress/usr.sbin/installboot/Makefile b/regress/usr.sbin/installboot/Makefile
index 3e62a94f844..3e08e76911e 100644
--- a/regress/usr.sbin/installboot/Makefile
+++ b/regress/usr.sbin/installboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.29 2022/09/14 09:57:47 kn Exp $
+# $OpenBSD: Makefile,v 1.30 2022/09/14 10:06:14 kn Exp $
INSTALLBOOT ?= /usr/sbin/installboot
DRY_RUN = ${INSTALLBOOT} -n
@@ -74,30 +74,14 @@ create-disks:
.for diskfile devfile in ${FILETUPLES}
dd if=/dev/zero of=${diskfile} bs=1m count=0 seek=128 status=none
${SUDO} vnconfig -- ${diskfile} 1>${devfile}
-.endfor
-
-format-disks: create-disks
-.for devfile in ${DISKDEVFILES}
${SUDO} ${FORMAT_DISK} -- "$$(<${devfile})" 1>/dev/null
. if ${USE_SOFTRAID:L} == "yes"
echo 'RAID 1M-* 100%' | \
${SUDO} disklabel -wAT/dev/stdin -- "$$(<${devfile})" 1>/dev/null
. endif
.endfor
-.if ${USE_SOFTRAID:L} == "yes"
- # XXX installboot(8) does not skip keydisks yet, so ensure the expected
- # MBR/GPT to avoid failing with
- # "installboot: invalid boot record signature (0x0000) @ sector 0"
- #
- # bioctl(8) and softraid(4) don't care about partition tables, they
- # just require a disklabel(5); remove the next command or merge this
- # block into above DISKDEVFILES loop once installboot skips keydisks.
- ${SUDO} ${FORMAT_DISK} -- "$$(<${KEYDEVFILE})" 1>/dev/null
- echo 'RAID 1M' | \
- ${SUDO} disklabel -wAT/dev/stdin -- "$$(<${KEYDEVFILE})" 1>/dev/null
-.endif
-create-root: format-disks
+create-root: create-disks
.if ${USE_SOFTRAID:L} == "yes"
${SUDO} bioctl -l"$$(sed -- s/$$/a/ ${DISKDEVFILES} | paste -sd, -- -)" \
-c1C -k"$$(<${KEYDEVFILE})"a -- softraid0 | \