[ -d "$MNTPOINT/$ISODIR" ] && umount "$MNTPOINT/$ISODIR" 1>/dev/null 2>&1
einfo "Unmounting $MNTPOINT" ; umount "$MNTPOINT" ; eend $?
[ -d "$MNTPOINT/$ISODIR" ] && umount "$MNTPOINT/$ISODIR" 1>/dev/null 2>&1
einfo "Unmounting $MNTPOINT" ; umount "$MNTPOINT" ; eend $?
# remove directory only if we used the default with process id inside the name
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
einfo "Removing directory ${MNTPOINT}" ; rmdir $MNTPOINT ; eend $?
# remove directory only if we used the default with process id inside the name
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
einfo "Removing directory ${MNTPOINT}" ; rmdir $MNTPOINT ; eend $?
for i in mkfs tunefs mount_target debootstrap_system preparechroot \
chrootscript grub_install umount_chroot fscktool ; do
if stage "${i}" ; then
for i in mkfs tunefs mount_target debootstrap_system preparechroot \
chrootscript grub_install umount_chroot fscktool ; do
if stage "${i}" ; then