Skip to content

Commit

Permalink
live-snapshot: honour "-o|--output FILE".
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Amadori <marco.amadori@gmail.com>
  • Loading branch information
mammadori authored and daniel-baumann committed Jun 10, 2008
1 parent 6753c99 commit 5fff6d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/live-snapshot
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -230,6 +232,8 @@ Defaults ()
DEST="${MOUNTP}/live-sn.ext2"
;;
esac
else
DEST="${SNAP_OUTPUT}"
fi
}

Expand Down

0 comments on commit 5fff6d8

Please sign in to comment.