Use partx to update partition table

partprobe does not appear to work in virtual machines. Let's find out if
`partx -u` does the same thing and also works on virt.

Change-Id: I4467299a82e728930ac8f99a0ba16d3ea7c6755c
Closes-Bug: #1418833
This commit is contained in:
Jim Rollenhagen 2015-02-06 07:08:09 -08:00 committed by Jay Faulkner
parent 571445438a
commit 877f66826c

@ -41,9 +41,9 @@ 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
# We need to run partx -u 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"
partx -u $DEVICE || fail "running partx -u $DEVICE"
# Check for preexisting partition for configdrive
EXISTING_PARTITION=`/sbin/blkid -l -o device $DEVICE -t LABEL=config-2`