summaryrefslogtreecommitdiffstats
path: root/core/modules/idleaction/data
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-27 13:38:49 +0100
committerSimon Rettberg2017-11-27 13:38:49 +0100
commit395ebf94caa047733b6e088e255fac791841c355 (patch)
tree4e3a2bd3c739b897354fd096541d0e4dbd05f919 /core/modules/idleaction/data
parent[idleaction] Rely on busybox providing rtcwake (diff)
downloadmltk-395ebf94caa047733b6e088e255fac791841c355.tar.gz
mltk-395ebf94caa047733b6e088e255fac791841c355.tar.xz
mltk-395ebf94caa047733b6e088e255fac791841c355.zip
[idleaction] Log to slx-admin if standby is not supported
Diffstat (limited to 'core/modules/idleaction/data')
-rwxr-xr-xcore/modules/idleaction/data/opt/openslx/scripts/idleaction-cron_script5
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