X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-debootstrap;h=2124614b6b4ce8cbf95647538546d656ee573f21;hb=601c99c7b3e1936e03aa16ce066ec4252c202507;hp=cff0116a0cdf4a9c6579f89cc32db9d6ef16563d;hpb=e0dc8d8a758b5a7ae2b3553391642c3dc603895f;p=grml-debootstrap.git diff --git a/grml-debootstrap b/grml-debootstrap index cff0116..2124614 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -257,7 +257,9 @@ cleanup() { # 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