diff options
author | Simon Rettberg | 2017-11-27 13:38:49 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-11-27 13:38:49 +0100 |
commit | 395ebf94caa047733b6e088e255fac791841c355 (patch) | |
tree | 4e3a2bd3c739b897354fd096541d0e4dbd05f919 /core | |
parent | [idleaction] Rely on busybox providing rtcwake (diff) | |
download | mltk-395ebf94caa047733b6e088e255fac791841c355.tar.gz mltk-395ebf94caa047733b6e088e255fac791841c355.tar.xz mltk-395ebf94caa047733b6e088e255fac791841c355.zip |
[idleaction] Log to slx-admin if standby is not supported
Diffstat (limited to 'core')
-rwxr-xr-x | core/modules/idleaction/data/opt/openslx/scripts/idleaction-cron_script | 5 |
1 files changed, 4 insertions, 1 deletions
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 |