summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/init_core.inc6
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc2
2 files changed, 7 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 942c7887..2d9239d0 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
@@ -31,5 +31,11 @@ if check_dep mkdir && ! mkdir -p "$TMPDIR"; then
EXIT_TYPE="internal" EXIT_REASON="Konnte kein Arbeitsverzeichnis für die VM-Sitzung anlegen." cleanexit 1
fi
+# Determine if /tmp resides on the hdd
+if grep -q -E '^/dev/\S+\s/tmp' '/proc/mounts'; then
+ writelog "Hard drive partition mounted on /tmp"
+ declare -rg TMP_ON_HDD=1
+fi
+
# Get a unique VM_ID for the current invocation
get_vm_id
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc
index 1319163d..46af7496 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc
@@ -34,7 +34,7 @@ set_virt_memory() {
# Amount of memory for the VM. Be generous if diff is written to HDD
local min=768
local reserve max
- if mount | grep -q '^/dev/sd.*on.*/tmp'; then
+ if isset TMP_ON_HDD; then
if lsmod | grep -q '^nvidia'; then
max=2800
reserve=28