On 2017-01-06 16:21, Bjoern Voigt wrote:
Andrei Borzenkov wrote:
On Thu, Dec 29, 2016 at 2:34 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
Hi,
I see scripts in "/usr/lib/systemd/system-sleep/". What would be the right place to add my own scripts?
It depends on what this script does.
A pointer to reading about them?
"man systemd-sleep" and "man bootup" would be a good start The manual page systemd-sleep.conf(5) says
NAME systemd-sleep.conf, sleep.conf.d - Suspend and hibernation configuration file
SYNOPSIS /etc/systemd/sleep.conf
/etc/systemd/sleep.conf.d/*.conf
/run/systemd/sleep.conf.d/*.conf
/usr/lib/systemd/sleep.conf.d/*.conf
Unfortunately none of the directories exist on Tumbleweed.
Nor on Leap. Not clear what one can do with those config files, though... :-? It seems very little.
May be /etc/systemd/sleep.conf.d/*.conf works, if the directory is created. It looks like a documentation issue.
My own scripts are in /usr/lib/systemd/system-sleep, which isn't an ideal place for user defined scripts.
My thought exactly. I will create my own wrapper script, that does needed checks in the appropriate sequence, then tell systemd to hibernate, or abort if not possible. And use the system-sleep scripts to undo on return. (time permitting...) I was point to this link: https://wiki.archlinux.org/index.php/Power_management#Sleep_hooks it seems good. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)