mirror of
https://github.com/systemd/systemd
synced 2024-07-22 18:55:10 +00: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:
parent
6b146cef3f
commit
b95bb3b3bb
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue