Merge "Prevent failure on 'copy_configdrive_to_disk.sh'"

This commit is contained in:
Jenkins 2016-05-19 09:46:29 +00:00 committed by Gerrit Code Review
commit 86ca19fae2

View File

@ -104,7 +104,7 @@ else
# Find partition we just created
# Dump all partitions, ignore empty ones, then get the last partition ID
ISO_PARTITION=`sfdisk --dump $DEVICE | grep -v ' 0,' | tail -n1 | awk '{print $1}'` || fail "finding ISO partition created on ${DEVICE}"
ISO_PARTITION=`sfdisk --dump $DEVICE | grep -v ' 0,' | tail -n1 | awk -F ':' '{print $1}' | sed -e 's/\s*$//'` || fail "finding ISO partition created on ${DEVICE}"
# Wait for udev to pick up the partition
udevadm settle --exit-if-exists=$ISO_PARTITION