mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
TEST-70-TPM2: Call udevadm wait after attaching disk image
Otherwise /dev/loop0p1 might not exist when calling systemd-cryptsetup attach.
This commit is contained in:
@@ -212,6 +212,7 @@ Encrypt=tpm2
|
||||
EOF
|
||||
PASSWORD=passphrase systemd-repart --tpm2-device-key=/tmp/srk.pub --definitions=/tmp/dditest --empty=create --size=50M /tmp/dditest.raw --tpm2-pcrs=
|
||||
DEVICE="$(systemd-dissect --attach /tmp/dditest.raw)"
|
||||
udevadm wait --settle --timeout=10 "$DEVICE"
|
||||
systemd-cryptsetup attach dditest "$DEVICE"p1 - tpm2-device=auto,headless=yes
|
||||
mkdir /tmp/dditest.mnt
|
||||
mount -t ext4 /dev/mapper/dditest /tmp/dditest.mnt
|
||||
|
||||
Reference in New Issue
Block a user