Merge "Run udevadm settle after kpartx -l"

This commit is contained in:
Jenkins 2015-03-31 20:17:03 +00:00 committed by Gerrit Code Review
commit 64d2b3647e

View File

@ -54,6 +54,7 @@ function extract_image() {
qemu-img convert -f qcow2 -O raw $CACHED_IMAGE $WORKING/$RAW_FILE qemu-img convert -f qcow2 -O raw $CACHED_IMAGE $WORKING/$RAW_FILE
ROOT_PARTITON=p$(sudo kpartx -l $WORKING/$RAW_FILE | awk "/loop[0-9]+p/"|wc -l) ROOT_PARTITON=p$(sudo kpartx -l $WORKING/$RAW_FILE | awk "/loop[0-9]+p/"|wc -l)
sudo udevadm settle
# kpartx fails if no /dev/loop* exists, "losetup -f" prints first unused # kpartx fails if no /dev/loop* exists, "losetup -f" prints first unused
# loop device and creates it if it doesn't exist # loop device and creates it if it doesn't exist