Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 646716

Summary: =sys-apps/systemd-236-r5: Regression: Scripts in /usr/lib/systemd/system-sleep/ not triggered anymore
Product: Gentoo Linux Reporter: Jan Buecken <jb.faq>
Component: Current packagesAssignee: Gentoo systemd Team <systemd>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 625954    

Description Jan Buecken 2018-02-05 21:39:59 UTC
Hello,
using systemd, you can put scripts in

/usr/lib64/systemd/system-sleep/ 

to run scripts if the system suspend or wake up from suspend.

This was working with

=sys-apps/systemd-233-r6

but not anymore with
=sys-apps/systemd-236-r5

I made sure I updated systemd only

[1] https://www.freedesktop.org/software/systemd/man/systemd-suspend.service.html

Steps to reproduce:
Create a script, e.g.

> cat /usr/lib64/systemd/system-sleep/wakeup.sh
#!/bin/bash
logger -t $0 "Pre or post?: $1";
logger -t $0 "Did run with $(systemctl --version)";

Make sure it is executable, suspend the system via 

systemctl suspend

On systemd-233-r6 you will see the log entries for pre and post. With 236-r5 you just see nothing in the log.

Greetings
Comment 1 Jan Buecken 2018-02-05 21:52:53 UTC
Cross, by try and error, I just found out it moved to

 /lib64/systemd/system-sleep/
Comment 2 Mike Gilbert gentoo-dev 2018-02-05 22:14:28 UTC
Yeah, you'll need to move those to /lib/systemd/system-sleep.

If there are packages that install files in /usr/lib/systemd/system-sleep, and they are not fixed after a rebuild, please file separate bugs for each package.
Comment 3 Jan Buecken 2018-02-06 20:17:07 UTC
Just found the news, should had have a look into it earlier...