projects
/
live-boot-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
live-snapshot: honour "-o|--output FILE".
[live-boot-grml.git]
/
bin
/
live-snapshot
diff --git
a/bin/live-snapshot
b/bin/live-snapshot
index
d4c6c34
..
03245ea
100755
(executable)
--- 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=""
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"
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
Error "unrecognized resync string"
;;
esac
- else
+ elif [ -z "${SNAP_OUTPUT}" ]
+ then
# Set target file based on image
case "${SNAP_TYPE}" in
cpio)
# Set target file based on image
case "${SNAP_TYPE}" in
cpio)
@@
-230,6
+232,8
@@
Defaults ()
DEST="${MOUNTP}/live-sn.ext2"
;;
esac
DEST="${MOUNTP}/live-sn.ext2"
;;
esac
+ else
+ DEST="${SNAP_OUTPUT}"
fi
}
fi
}
@@
-257,8
+261,6
@@
Validate_input ()
Mount_device ()
{
Mount_device ()
{
- mkdir -p "${MOUNTP}"
-
case "${SNAP_DEV}" in
"")
# create a temp
case "${SNAP_DEV}" in
"")
# create a temp