Wait for udev to create loopXpY device when preparing volatile.img

This commit is contained in:
Marek Marczykowski-Górecki 2015-05-13 01:44:35 +02:00
parent d5b67a67a2
commit 2856b6a836

View File

@ -28,7 +28,7 @@ sfdisk --no-reread -u M "$FILENAME" > /dev/null 2> /dev/null <<EOF
EOF
loopdev=`losetup -f --show --partscan "$FILENAME"`
mkswap -f ${loopdev}p1 > /dev/null
udevadm settle
mkswap -f ${loopdev}p1 > /dev/null
losetup -d ${loopdev} || :
chown --reference `dirname "$FILENAME"` "$FILENAME"