Merge "Fix: partitions recently imaged not being detected"

This commit is contained in:
Jenkins
2014-06-16 23:36:34 +00:00
committed by Gerrit Code Review

@@ -37,6 +37,10 @@ DEVICE="$2"
[[ -f $CONFIGDRIVE ]] || usage "$CONFIGDRIVE (CONFIGDRIVE) is not a regular file"
[[ -b $DEVICE ]] || usage "$DEVICE (DEVICE) is not a block device"
# We need to run partprobe to ensure all partitions are visible so the
# following blkid command returns partitions just imaged to the device
/sbin/partprobe $DEVICE || fail "running partprobe against $DEVICE"
# Check for preexisting partition for configdrive
EXISTING_PARTITION=`/sbin/blkid -l -o device $DEVICE -t LABEL=config-2`
if [[ $? == 0 ]]; then