diff options
author | Simon Rettberg | 2024-01-17 15:12:50 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-01-17 15:12:50 +0100 |
commit | 09296085cc90df989bf523046d5d0ca1c3b35a6c (patch) | |
tree | 6fc6cf8ad026dd1e988d3396dd743ac56ab7091b /core/modules/vmchooser2 | |
parent | [kiosk-common] Remove unused flag file (diff) | |
download | mltk-09296085cc90df989bf523046d5d0ca1c3b35a6c.tar.gz mltk-09296085cc90df989bf523046d5d0ca1c3b35a6c.tar.xz mltk-09296085cc90df989bf523046d5d0ca1c3b35a6c.zip |
[vmchooser2] Properly implement the re-autologin delay
Diffstat (limited to 'core/modules/vmchooser2')
-rwxr-xr-x | core/modules/vmchooser2/data/opt/openslx/bin/vmchooser | 10 |
1 files changed, 3 insertions, 7 deletions
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 |