Calling live-snapshot now produces an output file.
[live-boot-grml.git] / bin / live-snapshot
index 12c79b8..c50bcc0 100755 (executable)
@@ -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 ()