diff options
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.inc | 15 |
1 files changed, 8 insertions, 7 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 b3bc1cdf..00211c94 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,14 +31,15 @@ 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 -# This variable is empty (but set!) if no hard drive was mounted on /tmp +# Check that /tmp/virt is not in RAM. +# Either mounted directly (e.g. NFS) or backed by hdd mounted /tmp. +# This variable is empty (but set!) if /tmp/virt isn't backed at all # else it will be non-empty (check with helper function 'notempty'). -declare -g TMP_ON_HDD= -if ! grep -q -E '\s+/tmp\s+tmpfs\s+' '/proc/mounts'; then - writelog "Hard drive partition mounted on /tmp" - TMP_ON_HDD=1 - readonly TMP_ON_HDD +declare -g TMPDIR_NOT_RAM= +if ! dir_on_tmpfs /tmp/virt ; then + writelog "/tmp/virt is not in RAM, will allocate more RAM to VMs." + TMPDIR_NOT_RAM=1 + readonly TMPDIR_NOT_RAM fi # Get a unique VM_ID for the current invocation |