diff options
Diffstat (limited to 'core/modules/vmware-common')
l--------- | core/modules/vmware-common/data/etc/systemd/system/basic.target.wants/vmware.service (renamed from core/modules/vmware-common/data/etc/systemd/system/graphical.target.wants/vmware.service) | 0 | ||||
-rw-r--r-- | core/modules/vmware-common/data/etc/systemd/system/vmware.service | 5 | ||||
-rw-r--r-- | core/modules/vmware-common/data/opt/openslx/pam/hooks/session-open.d/vmware-tmpfs-dir | 17 | ||||
-rw-r--r-- | core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc | 3 | ||||
-rw-r--r-- | core/modules/vmware-common/module.conf | 1 |
5 files changed, 24 insertions, 2 deletions
diff --git a/core/modules/vmware-common/data/etc/systemd/system/graphical.target.wants/vmware.service b/core/modules/vmware-common/data/etc/systemd/system/basic.target.wants/vmware.service index 7deb4820..7deb4820 120000 --- a/core/modules/vmware-common/data/etc/systemd/system/graphical.target.wants/vmware.service +++ b/core/modules/vmware-common/data/etc/systemd/system/basic.target.wants/vmware.service diff --git a/core/modules/vmware-common/data/etc/systemd/system/vmware.service b/core/modules/vmware-common/data/etc/systemd/system/vmware.service index 78f75726..baab3747 100644 --- a/core/modules/vmware-common/data/etc/systemd/system/vmware.service +++ b/core/modules/vmware-common/data/etc/systemd/system/vmware.service @@ -1,7 +1,8 @@ [Unit] Description=Sets up the vmware environment -Requires=run-virt-env.service setup-partitions.service network.target -After=run-virt-env.service setup-partitions.service network.target +Requires=run-virt-env.service +After=run-virt-env.service +DefaultDependencies=no [Service] Type=oneshot diff --git a/core/modules/vmware-common/data/opt/openslx/pam/hooks/session-open.d/vmware-tmpfs-dir b/core/modules/vmware-common/data/opt/openslx/pam/hooks/session-open.d/vmware-tmpfs-dir new file mode 100644 index 00000000..ed5633ed --- /dev/null +++ b/core/modules/vmware-common/data/opt/openslx/pam/hooks/session-open.d/vmware-tmpfs-dir @@ -0,0 +1,17 @@ +create_vmware_tmpdir() { + local tmpdir="/tmp/vmware-${PAM_USER}" + [ -d "$tmpdir" ] || mkdir -p "$tmpdir" + grep -qE '^tmpfs\s+'"$tmpdir" /proc/mounts && return 0 + + local mount_opts="-o mode=0700,size=100%" + local user_uid="$(id -u $PAM_USER)" + [ -n "$user_uid" ] && mount_opts="${mount_opts},uid=${user_uid}" + local user_gid="$(id -g $PAM_USER)" + [ -n "$user_gid" ] && mount_opts="${mount_opts},gid=${user_gid}" + # NO QUOTES!!!1 + mount -t tmpfs tmpfs ${mount_opts} "$tmpdir" +} +if [ "x$PAM_SERVICE" != "xsu" -a "x$PAM_SERVICE" != "xsudo" ]; then + create_vmware_tmpdir +fi +true diff --git a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc index 41f5840e..4c62bb38 100644 --- a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc +++ b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc @@ -158,6 +158,9 @@ setup_vcpu_ram() { MemAllowAutoScaleDown = "FALSE" MemTrimRate = "-1" HEREEND + + # temporary solution: RAM backing file on a tmpfs + echo 'mainmem.backing = "unnamed"' >> "$TMPCONFIG" } setup_usb() { diff --git a/core/modules/vmware-common/module.conf b/core/modules/vmware-common/module.conf index 8811668a..9b75fd6b 100644 --- a/core/modules/vmware-common/module.conf +++ b/core/modules/vmware-common/module.conf @@ -1,4 +1,5 @@ #!/bin/bash +REQUIRED_MODULES="slxlog" REQUIRED_BINARIES="" REQUIRED_LIBRARIES="" REQUIRED_DIRECTORIES="" |