From: Patrick Schleizer Date: Thu, 7 Dec 2023 18:52:36 +0000 (-0500) Subject: the first `rmdir "$MNTPOINT"` needs `|| true` X-Git-Tag: v0.106~7^2~7 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=cc96e883fa7ca0870b2428cda94aa0054dc02642 the first `rmdir "$MNTPOINT"` needs `|| true` because it will not always work will not work in cases where /dev etc is still mounted inside the chroot --- diff --git a/grml-debootstrap b/grml-debootstrap index 29ae03f..bac28b0 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -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