fix `cleanup` function
authorPatrick Schleizer <adrelanos@whonix.org>
Wed, 25 Oct 2023 15:57:27 +0000 (11:57 -0400)
committerPatrick Schleizer <adrelanos@whonix.org>
Thu, 7 Dec 2023 18:50:23 +0000 (13:50 -0500)
only delete `$MNTPOINT` if such a folder actually exists

grml-debootstrap

index cff0116..2124614 100755 (executable)
@@ -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