#!/bin/bash
# Copyright (C) 2007, 2008, 2009 Google Inc.
+# Portions Copyright 2013 Equinox Software, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
CLEANUP+=("losetup -d $blockdev")
fi
+# First line in the dump contains the partion and/or
+# filesystem type.
+read -r export_type
+if [ "$export_type" = "swap" ]; then
+ mkswap -f $blockdev
+ exit 0
+fi
+
if [ "$PARTITION_STYLE" = "none" ]; then
filesystem_dev=$blockdev
elif [ "$PARTITION_STYLE" = "msdos" ]; then