Calling live-snapshot now produces an output file.
authorMarco Amadori <amadorim@vdavda.com>
Wed, 28 May 2008 08:34:35 +0000 (10:34 +0200)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:47:59 +0000 (17:47 +0100)
* Invoking live-snapshot without parameters now produces an output
  file useful to be copied on a writable media as intended.

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 ()