the first `rmdir "$MNTPOINT"` needs `|| true`
authorPatrick Schleizer <adrelanos@whonix.org>
Thu, 7 Dec 2023 18:52:36 +0000 (13:52 -0500)
committerPatrick Schleizer <adrelanos@whonix.org>
Thu, 7 Dec 2023 18:52:36 +0000 (13:52 -0500)
because it will not always work

will not work in cases where /dev etc is still mounted inside the chroot

grml-debootstrap

index 29ae03f..bac28b0 100755 (executable)
@@ -258,7 +258,7 @@ cleanup() {
   # Remove temporary mountpoint again
   if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then
     if [ -d "$MNTPOINT" ] ; then
-      rmdir "$MNTPOINT"
+      rmdir "$MNTPOINT" || true
     fi
   fi