Skip to content

Commit

Permalink
Switch to using case statement and add new image types for qemu images
Browse files Browse the repository at this point in the history
  • Loading branch information
ramereth committed Apr 19, 2015
1 parent 83aba32 commit 1f9dbf1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions create
Expand Up @@ -94,15 +94,18 @@ if [ "$CDINSTALL" = "no" ] ; then
exit 1
fi

# If the image is tarball based, then we need to manually create the
# volumes, filesystems, etc
if [ "${IMAGE_TYPE}" = "tarball" -o "${IMAGE_TYPE}" = "dump" ] ; then
case "$IMAGE_TYPE" in
tarball|dump)
# If the image is tarball based, then we need to manually create the
# volumes, filesystems, etc
# Create 3 partitions, /boot, swap, & /
format_disk0 $blockdev
elif [ "${IMAGE_TYPE}" = "qemu" ] ; then
;;
qemu|raw|qcow2)
# need a recent version of qemu for this
${QEMU_IMG} convert ${IMAGE_FILE} -O host_device ${blockdev} > /dev/null
fi
;;
esac

# deploying something like a windows image, skip the rest
if [ "${NOMOUNT}" = "yes" ] ; then
Expand Down

0 comments on commit 1f9dbf1

Please sign in to comment.