1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-13 17:18:18 +03:00

test: wait for the lodev to get properly initialized

Otherwise we might start writing to one of its partition before the
respective node is created under /dev, resulting in... interesting
stuff.

Resolves: #24390
This commit is contained in:
Frantisek Sumsal 2022-08-23 14:44:01 +02:00
parent 37d35150cb
commit bca762ce1a

View File

@ -187,6 +187,7 @@ if [ "${HAVE_OPENSSL}" -eq 1 ]; then
sfdisk --part-label "${image}.gpt" 3 "Signature Partition"
fi
loop="$(losetup --show -P -f "${image}.gpt")"
udevadm wait --timeout 60 --settle "${loop:?}"
dd if="${image}.raw" of="${loop}p1"
dd if="${image}.verity" of="${loop}p2"
if [ "${HAVE_OPENSSL}" -eq 1 ]; then