X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-debootstrap;h=08e6fe2d1a4d240ea5b942d653113a031c567878;hb=d2be7fb21bfd1c28199ddc1959dfd3e15149acc8;hp=2124614b6b4ce8cbf95647538546d656ee573f21;hpb=601c99c7b3e1936e03aa16ce066ec4252c202507;p=grml-debootstrap.git diff --git a/grml-debootstrap b/grml-debootstrap index 2124614..08e6fe2 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -299,8 +299,10 @@ cleanup() { # 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 $? + if test -d "$MNTPOINT" ; then + einfo "Removing directory ${MNTPOINT}" + rmdir "$MNTPOINT" || eend $? + fi fi fi fi