From 09296085cc90df989bf523046d5d0ca1c3b35a6c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 17 Jan 2024 15:12:50 +0100 Subject: [vmchooser2] Properly implement the re-autologin delay --- core/modules/vmchooser2/data/opt/openslx/bin/vmchooser | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'core/modules/vmchooser2') diff --git a/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser index 9bcc2b5a..a0048f39 100755 --- a/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser +++ b/core/modules/vmchooser2/data/opt/openslx/bin/vmchooser @@ -80,13 +80,9 @@ fi # Delay autologin a bit to prevent the old vm process still cleaning up while trying to # set up a new one -- this might lead to OOM errors -if /opt/openslx/lightdm/is-autologin-enabled && [ -s "/run/openslx/session-killed" ]; then - KT=$(cat "/run/openslx/session-killed") - NOW=$(date +%s) - KT=$(( KT + 10 - NOW )) - if [ "$KT" -gt 0 ]; then - sleep "$KT" - fi +if /opt/openslx/lightdm/is-autologin-enabled; then + [ -s "/tmp/another-autologin" ] && sleep 5 + touch "/tmp/another-autologin" fi if [ -n "$SLX_LOCATIONS" ]; then -- cgit v1.2.3-55-g7522