Skip to content

Commit

Permalink
Merge pull request #479 from sheldonh/master
Browse files Browse the repository at this point in the history
Support swapless builders in minimize.sh
  • Loading branch information
Seth Thomas committed Oct 19, 2015
2 parents ec1a89a + 238b70b commit abd2c7b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/common/minimize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ case "$PACKER_BUILDER_TYPE" in
qemu) exit 0 ;;
esac

set +e
swapuuid="`/sbin/blkid -o value -l -s UUID -t TYPE=swap`";
case "$?" in
2|0) ;;
*) exit 1 ;;
esac
set -e

if [ "x${swapuuid}" != "x" ]; then
# Whiteout the swap partition to reduce box size
Expand Down

0 comments on commit abd2c7b

Please sign in to comment.