diff options
author | Marco Amadori <marco.amadori@gmail.com> | 2008-06-08 00:50:42 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:00 +0100 |
commit | b7e456cbafb2d594a9f9317f11a99740bd1af4d6 (patch) | |
tree | da4d9d1b83210e5706609b5b2a08fb1297fb6071 /bin | |
parent | 74b908c499ee60fa7c4b43b0da5fde6fec1f554a (diff) | |
download | live-boot-b7e456cbafb2d594a9f9317f11a99740bd1af4d6.tar.gz live-boot-b7e456cbafb2d594a9f9317f11a99740bd1af4d6.zip |
live-snapshot: honour "-o|--output FILE".
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/live-snapshot | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/live-snapshot b/bin/live-snapshot index 7cf9bf9..03245ea 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -42,6 +42,7 @@ SAFE_TMPDIR="/live" MOUNTP="$(mktemp -d -p ${SAFE_TMPDIR} live-snapshot-mnt.XXXXXX)" SNAP_COW="/live/cow" SNAP_DEV="" +SNAP_OUTPUT="" DEST="${MOUNTP}/live-sn.cpio.gz" SNAP_TYPE="cpio" DESKTOP_LINK="/home/${USERNAME}/Desktop/live-snapshot" @@ -215,7 +216,8 @@ Defaults () Error "unrecognized resync string" ;; esac - else + elif [ -z "${SNAP_OUTPUT}" ] + then # Set target file based on image case "${SNAP_TYPE}" in cpio) @@ -230,6 +232,8 @@ Defaults () DEST="${MOUNTP}/live-sn.ext2" ;; esac + else + DEST="${SNAP_OUTPUT}" fi } |