# live-snapshot - utility to manage Debian Live systems snapshots
#
-# This program mount a device (fallback to /tmpfs under $MOUNTP
-# and save the /live/cow (or a different dir) filesystem in it for reusing
+# This program mounts a device (fallback to /tmpfs under $MOUNTP
+# and saves the /live/cow (or a different dir) filesystem in it for reuse
# in another live-initramfs session. Look at manpage for more info.
#
# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
exit 0
}
-
Version ()
{
esac
done
-
}
Defaults ()
Error "unrecognized resync string"
;;
esac
-
else
# Set target file based on image
case "${SNAP_TYPE}" in
;;
esac
fi
-
}
Validate_input ()
{
- case "${SNAP_TYPE}" in
+ case "${SNAP_TYPE}" in
cpio|squashfs|jffs2|ext2|ext3)
;;
+
*)
Error "invalid filesystem type \"${SNAP_TYPE}\""
;;
# create a temp
mount -t tmpfs -o rw tmpfs "${MOUNTP}"
;;
+
*)
if [ -b "${SNAP_DEV}" ]
then
Parse_args "${@}"
Defaults
Validate_input
- trap 'Clean' EXIT
+ trap 'Clean' EXIT
Mount_device
Do_snapshot
}