X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=bin%2Flive-snapshot;h=c50bcc061a41a127eaf0c0b7c9a7f8e4fffb4e88;hb=8e528a99632ef0ae43826dd7a487c4a0c12010a6;hp=12c79b83353978bc438dd079a99ef344cb7a3796;hpb=f02ff60da1a862bb4eb0631cb9b7e527ffa1f32e;p=live-boot-grml.git diff --git a/bin/live-snapshot b/bin/live-snapshot index 12c79b8..c50bcc0 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -313,8 +313,13 @@ Do_snapshot () Clean () { - umount "${MOUNTP}" - rmdir "${MOUNTP}" + if echo "${DEST}" | grep -q "${MOUNTP}" + then + echo "${DEST} is present on ${MOUNTP}, therefore no automatic unmounting the latter." > /dev/null 1>&2 + else + umount "${MOUNTP}" + rmdir "${MOUNTP}" + fi } Main ()