]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/sleep/sleep.c
shared/sleep-config: add switches to kill specific sleep modes
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 26 Sep 2018 09:17:36 +0000 (11:17 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 8 Oct 2018 16:21:00 +0000 (18:21 +0200)
commite8f1d00d695f491654d50e57c82623288d3bcbeb
tree9a4bd310da72f0d3ade19937a8f111c95d54551c
parent5fdf2d51c244288ac41443d1bd81365fab7b7b81
shared/sleep-config: add switches to kill specific sleep modes

/etc/systemd/sleep.conf gains four new switches:
AllowSuspend=, AllowHibernation=, AllowSuspendThenHibernate=, AllowHybridSleep=.

Disabling specific modes was already possible by masking suspend.target,
hibernate.target, suspend-then-hibernate.target, or hybrid-sleep.target.
But this is not convenient for distributions, which want to set some defaults
based on what they want to support. Having those available as configuration
makes it easy to put a config file in /usr/lib/systemd/sleep.conf.d/ that
overrides the defaults and gives instructions how to undo that override.
TODO
man/systemd-sleep.conf.xml
src/shared/sleep-config.c
src/shared/sleep-config.h
src/sleep/sleep.c
src/test/test-sleep.c