projects
/
grml-debootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
601c99c
)
fix `cleanup` function
author
Patrick Schleizer
<adrelanos@whonix.org>
Wed, 25 Oct 2023 16:02:14 +0000
(12:02 -0400)
committer
Patrick Schleizer
<adrelanos@whonix.org>
Thu, 7 Dec 2023 18:50:57 +0000
(13:50 -0500)
only delete `$MNTPOINT` if such a folder actually exists
grml-debootstrap
patch
|
blob
|
history
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
2124614
..
08e6fe2
100755
(executable)
--- 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