diff options
| -rwxr-xr-x | bin/live-snapshot | 9 |
1 files changed, 7 insertions, 2 deletions
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 () |
