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 <ji...@gmx.net> пишет:

>  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 when sleep.target gets started. Only one can win.

Indeed, but I was assuming that combined with "after" they could co-exist, starting the unit after the dependency has started and stopped. And if it was a problem I would expect a message, since it's easy to detect.

Anyway even removing the Conflicts line does not help. "systemctl enable" still does not install the symlink, and manually installing the symlink does not change anything.

Hmmm I did some more trials with the "conflicts" line commented out. While just listing "sleep.target" didn't work, the following was successful and the unit starts after resuming:

After=sleep.target suspend.target hibernate.target hybrid-sleep.target
WantedBy=multi-user.target sleep.target suspend.target hibernate.target 
hybrid-sleep.target

In addition "systemctl disable/enable" didn't create the symlinks, I had to properly add them. Maybe it's a bug?


Thanks,
Dimitris
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to