diff options
author | Simon Rettberg | 2022-09-30 15:24:08 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-09-30 15:24:08 +0200 |
commit | 7bbc58c3c61ea4d2fa487543fff9d3f2dbf873bd (patch) | |
tree | 333fff5f4bc80c4f9e459cb9a6565de9aafea73e /core/modules/idleaction/data | |
parent | [vmchooser2] Force X11 session preselect if < 5GB RAM (diff) | |
download | mltk-7bbc58c3c61ea4d2fa487543fff9d3f2dbf873bd.tar.gz mltk-7bbc58c3c61ea4d2fa487543fff9d3f2dbf873bd.tar.xz mltk-7bbc58c3c61ea4d2fa487543fff9d3f2dbf873bd.zip |
[idleaction] Make auto-logout = shutdown when auto-login is enabled
Diffstat (limited to 'core/modules/idleaction/data')
-rwxr-xr-x | core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher b/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher index 98168436..640ef9fb 100755 --- a/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher +++ b/core/modules/idleaction/data/opt/openslx/scripts/idle-daemon-launcher @@ -6,6 +6,17 @@ CMD= [ -n "$SLX_SHUTDOWN_TIMEOUT" ] && CMD="$CMD --poweroff-timeout $SLX_SHUTDOWN_TIMEOUT" +if [ -n "${SLX_AUTOLOGIN%OFF}" ]; then + # Autologin is enabled - special case logout timeout, which should turn into + # a shutdown. + if [ -n "$SLX_SHUTDOWN_TIMEOUT" ] && [ -n "$SLX_LOGOUT_TIMEOUT" ] && [ "$SLX_SHUTDOWN_TIMEOUT" -gt "$SLX_LOGOUT_TIMEOUT" ]; then + SLX_LOGOUT_TIMEOUT="$SLX_SHUTDOWN_TIMEOUT" + fi + if [ -n "$SLX_LOGOUT_TIMEOUT" ]; then + CMD="$CMD --logout-is-shutdown" + fi +fi + if [ -z "${SLX_EXAM}" ]; then # Exam mode inactive [ -n "$SLX_LOGOUT_TIMEOUT" ] && CMD="$CMD --logout-timeout $SLX_LOGOUT_TIMEOUT" |