Do NOT execute umount -a in chroot.
[grml-debootstrap.git] / grml-debootstrap
index 1c60bf4..f6de36b 100755 (executable)
@@ -994,6 +994,12 @@ done
 # }}}
 
 # finalize {{{
 # }}}
 
 # finalize {{{
+if [ -n "$ISODIR" ] ; then
+   einfo "Unmounting Debian image loopback from $MNTPOINT/$ISODIR."
+   umount "$MNTPOINT/$ISODIR"
+   eend $?
+fi
+
 einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $?
 einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $?
 
 einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $?
 einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $?