Merge "Mount with -o nouuid for XFS base images"

This commit is contained in:
Jenkins 2015-05-04 00:42:21 +00:00 committed by Gerrit Code Review
commit d734899997

View File

@ -74,7 +74,14 @@ function extract_image() {
EACTION="sudo kpartx -d $RAW_FILE ; $EACTION" EACTION="sudo kpartx -d $RAW_FILE ; $EACTION"
trap "$EACTION" EXIT trap "$EACTION" EXIT
mkdir $WORKING/mnt mkdir $WORKING/mnt
sudo mount /dev/mapper/$ROOT_LOOPDEV $WORKING/mnt if [ "xfs" = "$(sudo blkid -o value -s TYPE /dev/mapper/$ROOT_LOOPDEV)" ]; then
# mount xfs with nouuid, just in case that uuid is already mounted
MOUNTOPTS="-o nouuid"
else
MOUNTOPTS=""
fi
sudo mount $MOUNTOPTS /dev/mapper/$ROOT_LOOPDEV $WORKING/mnt
EACTION="sudo umount -f $WORKING/mnt ; $EACTION" EACTION="sudo umount -f $WORKING/mnt ; $EACTION"
trap "$EACTION" EXIT trap "$EACTION" EXIT