Wait for udev to process all the events during volatile.img preparation
Otherwise it could happen that the device will still be opened by udev, so can't be freed by kpartx
This commit is contained in:
parent
063e2617d6
commit
98ab523da4
@ -40,7 +40,7 @@ kpartx -s -a "$FILENAME"
|
||||
loopdev=`losetup -j "$FILENAME"|tail -n 1 |cut -d: -f1`
|
||||
looppart=`echo $loopdev|sed 's:dev:dev/mapper:'`
|
||||
mkswap -f ${looppart}p1 > /dev/null
|
||||
sync
|
||||
udevadm settle
|
||||
kpartx -s -d ${loopdev}
|
||||
losetup -d ${loopdev} || :
|
||||
chown --reference `dirname "$FILENAME"` "$FILENAME"
|
||||
|
Loading…
Reference in New Issue
Block a user