summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
diff options
context:
space:
mode:
authorJonathan Bauer2017-08-16 12:35:58 +0200
committerJonathan Bauer2017-08-16 12:35:58 +0200
commit1e11848ca8604a03d411cbf1b4c39b5fb44cdbec (patch)
treeb8e53fcaff332c26bca201a2a7736be4c001a228 /core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
parent[run-virt] make sure TMP_ON_HDD is empty if needed (diff)
downloadmltk-1e11848ca8604a03d411cbf1b4c39b5fb44cdbec.tar.gz
mltk-1e11848ca8604a03d411cbf1b4c39b5fb44cdbec.tar.xz
mltk-1e11848ca8604a03d411cbf1b4c39b5fb44cdbec.zip
[run-virt] TMP_ON_HDD stuff
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc')
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
index 9af8839a..95e90ebf 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc
@@ -30,8 +30,11 @@ if check_dep mkdir && ! mkdir -p "$TMPDIR"; then
writelog "Could not create temporary directory '$TMPDIR' for session"
EXIT_TYPE="internal" EXIT_REASON="Konnte kein Arbeitsverzeichnis für die VM-Sitzung anlegen." cleanexit 1
fi
-declare -g TMP_ON_HDD=
+
# Determine if /tmp resides on the hdd
+# This variable is empty (but set!) if no hard drive was mounted on /tmp
+# else it will be non-empty (check with helper function 'notempty').
+declare -g TMP_ON_HDD=
if grep -q -E '^/dev/\S+\s/tmp' '/proc/mounts'; then
writelog "Hard drive partition mounted on /tmp"
TMP_ON_HDD=1