#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1223 2023/01/28 18:44:31 phessler Exp $
+# $OpenBSD: install.sub,v 1.1224 2023/02/02 13:29:16 kn Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
echo -n $_disks
}
+# Return list of softraid chunks, optionally limited to the volume $1.
+get_softraid_chunks() {
+ local _device=${1:-softraid0}
+
+ bioctl $_device 2>/dev/null | sed -n 's/.*<\(.*\)>$/\1/p'
+}
+
# Return list of all network devices, optionally limited by parameters to
# ifconfig. Filter out dynamically created network pseudo-devices except vlan.
get_ifs() {
# In case this is a softraid device, make sure all underlying
# device nodes exist before installing boot-blocks on disk.
- make_dev $(bioctl $ROOTDISK 2>/dev/null | sed -n 's/.*<\(.*\)>$/\1/p')
+ make_dev $(get_softraid_chunks $ROOTDISK)
md_installboot $ROOTDISK
chmod og-rwx /mnt/bsd{,.mp,.rd} 2>/dev/null