only delete `$MNTPOINT` if such a folder actually exists
# Remove temporary mountpoint again
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
# Remove temporary mountpoint again
if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
- rmdir "$MNTPOINT" 2>/dev/null
+ if [ -d "$MNTPOINT" ] ; then
+ rmdir "$MNTPOINT" 2>/dev/null
+ fi
fi
# make sure $TARGET is not mounted when exiting grml-debootstrap
fi
# make sure $TARGET is not mounted when exiting grml-debootstrap