Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-03 Thread Dimitrios Apostolou
On Fri, 3 Apr 2015, Lennart Poettering wrote: On Thu, 02.04.15 21:24, Dimitrios Apostolou (ji...@gmx.net) wrote: Usually if one wants to do that one is just working around some problems that are better solved in a different way. Why precisely do you need this feature? I need to properly ter

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-03 Thread Lennart Poettering
On Thu, 02.04.15 21:24, Dimitrios Apostolou (ji...@gmx.net) wrote: > >Usually if one wants to do that one is just working around some > >problems that are better solved in a different way. > > > >Why precisely do you need this feature? > > I need to properly terminate system accounting, in the sa

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Dimitrios Apostolou
On Thu, 2 Apr 2015, Lennart Poettering wrote: On Thu, 02.04.15 18:43, Dimitrios Apostolou (ji...@gmx.net) wrote: Hello list, I'm having trouble to auto-activate a unit on resume, after suspend-to-ram or hibernation. The unit properly stops when suspending (because of Conflicts=sleep.target),

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Lennart Poettering
On Thu, 02.04.15 18:43, Dimitrios Apostolou (ji...@gmx.net) wrote: > Hello list, > > I'm having trouble to auto-activate a unit on resume, after suspend-to-ram > or hibernation. The unit properly stops when suspending (because of > Conflicts=sleep.target), but does not restart after resuming. We

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Dimitrios Apostolou
On Thu, 2 Apr 2015, Andrei Borzenkov wrote: В Thu, 2 Apr 2015 19:34:55 +0200 (CEST) Dimitrios Apostolou пишет: On Thu, 2 Apr 2015, Dimitrios Apostolou wrote: On Thu, 2 Apr 2015, Andrei Borzenkov wrote: В Thu, 2 Apr 2015 18:43:40 +0200 (CEST) Dimitrios Apostolou пишет: Conflicts=slee

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Andrei Borzenkov
В Thu, 2 Apr 2015 19:34:55 +0200 (CEST) Dimitrios Apostolou пишет: > On Thu, 2 Apr 2015, Dimitrios Apostolou wrote: > > > On Thu, 2 Apr 2015, Andrei Borzenkov wrote: > > > >> В Thu, 2 Apr 2015 18:43:40 +0200 (CEST) > >> Dimitrios Apostolou пишет: > >> > >> > Conflicts=sleep.target > >> > W

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Dimitrios Apostolou
On Thu, 2 Apr 2015, Dimitrios Apostolou wrote: On Thu, 2 Apr 2015, Andrei Borzenkov wrote: В Thu, 2 Apr 2015 18:43:40 +0200 (CEST) Dimitrios Apostolou пишет: > Conflicts=sleep.target > WantedBy=multi-user.target sleep.target These are mutually conflicting. One one hand Conflicts says t

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Dimitrios Apostolou
On Thu, 2 Apr 2015, Andrei Borzenkov wrote: В Thu, 2 Apr 2015 18:43:40 +0200 (CEST) Dimitrios Apostolou пишет: Conflicts=sleep.target WantedBy=multi-user.target sleep.target These are mutually conflicting. One one hand Conflicts says to stop your unit when sleep.target gets started, on the

Re: [systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Andrei Borzenkov
В Thu, 2 Apr 2015 18:43:40 +0200 (CEST) Dimitrios Apostolou пишет: > Conflicts=sleep.target > WantedBy=multi-user.target sleep.target These are mutually conflicting. One one hand Conflicts says to stop your unit when sleep.target gets started, on the other hand WantedBy says to start your unit w

[systemd-devel] Starting a unit on resume from suspend/hibernate

2015-04-02 Thread Dimitrios Apostolou
Hello list, I'm having trouble to auto-activate a unit on resume, after suspend-to-ram or hibernation. The unit properly stops when suspending (because of Conflicts=sleep.target), but does not restart after resuming. The key to achieve this as far as I understand, are the following two claus