Networking updates. Postrun debugging info.

This commit is contained in:
Raphaël Numbus
2026-02-16 15:23:57 +01:00
parent e5503a3ef3
commit dcdb29d952
3 changed files with 9 additions and 4 deletions
+4
View File
@@ -930,15 +930,19 @@ postrun_action() {
echo "Enrolling boot disk key to TPM..."
BOOT_DISKS_ID=(${BOOT_DISKS_ID[@]})
DEBUG=${DEBUG}
DISK_PATH=""
j=1
for i in \${!BOOT_DISKS_ID[@]}; do
if echo "\${BOOT_DISKS_ID[\${i}]}" | grep -iq "nvme"; then
[[ "\${DEBUG}" == "true" ]] && echo "NVMe detected..."
DISK_PATH="/dev/\${BOOT_DISKS_ID[\${i}]}p2"
else
[[ "\${DEBUG}" == "true" ]] && echo "Non-NVMe drive detected..."
DISK_PATH="/dev/\${BOOT_DISKS_ID[\${i}]}2"
fi
[[ "\${DEBUG}" == "true" ]] && echo "Issuing enroll command for disk \${DISK_PATH}..."
echo ${REMOTE_PASS} | sudo -S systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+7 --unlock-key-file=/etc/secrets/disks/boot-\${j} \${DISK_PATH}
j=\$((j + 1))
done