summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-09-10 16:54:22 +0200
committerSimon Rettberg2019-09-10 16:54:22 +0200
commit31222825490000ba0f669f466f483de7d0d2bc5c (patch)
tree317cef0070932fe8251e0088f3a7b7e40ca80f43
parent[run-virt] Fix: Explicitly initialize empty arrays (diff)
downloadmltk-31222825490000ba0f669f466f483de7d0d2bc5c.tar.gz
mltk-31222825490000ba0f669f466f483de7d0d2bc5c.tar.xz
mltk-31222825490000ba0f669f466f483de7d0d2bc5c.zip
[run-virt] Only wipe TMPDIR on cleanexit 0
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
index 937905ab..a40069d2 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
@@ -148,8 +148,8 @@ cleanexit() {
# kill potential remaining background jobs
kill $(jobs -p)
- # If we're not in debug mode, remove all temporary files
- if ! "$DEBUG" && notempty TMPDIR; then
+ # If we're not in debug mode AND got a clean exit code, remove all temporary files
+ if ! "$DEBUG" && notempty TMPDIR && [ "$1" = "0" ]; then
rm -rf -- "${TMPDIR}"
fi