[systemd-devel] SYSTEMD_WANTS and oneshot services
Albert Strasheim
fullung at gmail.com
Wed Aug 24 05:28:38 PDT 2011
Hello
On Wed, Aug 24, 2011 at 2:04 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Wed, 24.08.11 13:26, Albert Strasheim (fullung at gmail.com) wrote:
>> When reloading the module, there is no transaction in the debug log.
>> When I strace systemd, I can see that epoll returns and that systemd
>> calls recvmsg twice for the netlink messages about the two network
>> ports. systemd doesn't do anything else after that.
>> At this point, a systemctl daemon-reload followed by a systemctl
>> status still yields an active (exited) service. Reloading the module
>> after the systemctl daemon-reload still does not rerun the service.
> "active (exited)" suggests that you set RemainAfterExit=yes?
I have tried with RemainAfterExit=yes and no. Neither one makes
systemd restart the service after reloading the module.
>> Maybe the service should have a Requisite= on the
>> sys-subsystem...device so that it is stopped when the device
>> disappears? I tried this, but the subsystem alias still doesn't seem
>> to work, even with the fixed udev rules.
> You need BindTo=, not Requires= for that.
Thanks. I tried adding BindTo= to the service, hoping that it would
really be stopped when the device disappeared, but systemd still
doesn't rerun the service.
Also, a BindTo= that refers to the sys-subsystem-... alias eventually
times out saying the device failed to start, so that isn't working
either (even with the fixed udev rule).
I'll do the extra bit of debugging you suggested.
This issue should be quite easy to reproduce using any machine with
its network card code as a module.
Regards
Albert
More information about the systemd-devel
mailing list