Re: [systemd-devel] Shutdown notify

2014-08-20 Thread Colin Guthrie
Lennart Poettering wrote on 20/08/14 14:58: > On Wed, 20.08.14 15:50, Michal Witanowski ([email protected]) wrote: > >> >> The inhibit locks mechanism seems to be the solution, but another problem >> appeared. I am unable to call Inhibit() method as non-root user. In the >> documentation I

Re: [systemd-devel] Shutdown notify

2014-08-20 Thread Lennart Poettering
On Wed, 20.08.14 15:50, Michal Witanowski ([email protected]) wrote: > > The inhibit locks mechanism seems to be the solution, but another problem > appeared. I am unable to call Inhibit() method as non-root user. In the > documentation I read "Taking inhibitor locks is a privileged operat

Re: [systemd-devel] Shutdown notify

2014-08-20 Thread Michal Witanowski
sers group? Note that I do NOT have PolicyKit in the system... BR, Michal -Original Message- From: Lennart Poettering [mailto:[email protected]] Sent: Tuesday, August 19, 2014 1:40 PM To: Michal Witanowski Cc: [email protected] Subject: Re: [systemd-devel] Shutdown

Re: [systemd-devel] Shutdown notify

2014-08-19 Thread Lennart Poettering
On Tue, 19.08.14 14:49, Michal Witanowski ([email protected]) wrote: > What if I'm using systemd built without logind? Not available then. Sorry. You only have the time between SIGTERM and your processes' exit(). It's pretty much logind's job to implement things like these inhibitors. If

Re: [systemd-devel] Shutdown notify

2014-08-19 Thread Michal Witanowski
What if I'm using systemd built without logind? -Original Message- From: Lennart Poettering [mailto:[email protected]] Sent: Tuesday, August 19, 2014 1:40 PM To: Michal Witanowski Cc: [email protected] Subject: Re: [systemd-devel] Shutdown notify On Tue, 19.

Re: [systemd-devel] Shutdown notify

2014-08-19 Thread Lennart Poettering
On Tue, 19.08.14 13:34, Michal Witanowski ([email protected]) wrote: > Hi all, > > I would like to know if there is a possibility to get notified about > upcoming shutdown/restart. For example: > > . Somebody executes "systemctl reboot" / "systemctl poweroff" > > . A call

[systemd-devel] Shutdown notify

2014-08-19 Thread Michal Witanowski
Hi all, I would like to know if there is a possibility to get notified about upcoming shutdown/restart. For example: . Somebody executes "systemctl reboot" / "systemctl poweroff" . A callback function is called in my service before SIGTERM is triggered on ANY service. .