From 395ebf94caa047733b6e088e255fac791841c355 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 27 Nov 2017 13:38:49 +0100 Subject: [idleaction] Log to slx-admin if standby is not supported --- .../idleaction/data/opt/openslx/scripts/idleaction-cron_script | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/modules/idleaction') diff --git a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-cron_script b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-cron_script index 929ae68c..f3afc579 100755 --- a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-cron_script +++ b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-cron_script @@ -99,7 +99,10 @@ if [ -e "$IDLEHINT" ]; then poweroff & exit 0 elif [ -n "${SLX_SYSTEM_STANDBY_TIMEOUT}" ] && [ "${SLX_SYSTEM_STANDBY_TIMEOUT}" -gt 0 ] && [ "$IDLE" -gt "$SLX_SYSTEM_STANDBY_TIMEOUT" ]; then - systemctl suspend & + rm -f -- "$IDLEHINT" + if ! systemctl suspend; then + slxlog --sync "idleaction-no-suspend" "Client does not support standby/suspend, doing nothing" + fi exit 0 fi fi -- cgit v1.2.3-55-g7522