Bug#870361: systemd: after/before is ignored
Vladislav Kurz
vladislav.kurz at webstep.net
Tue Aug 1 15:01:34 BST 2017
On 08/01/17 15:38, Michael Biebl wrote:
> Am 27.07.2017 um 17:23 schrieb Vladki:
>
> I'm pretty sure After/Before works correctly.
> Can you please be more specific which units should be ordered against
> each other in what way.
>
>
For example smbd/nmbd:
smbd has:
After=network.target nmbd.service winbind.service
nmbd has:
After=network-online.target
Wants=network-online.target
But in syslog I've seen smbd occasionally starting before nmbd,
and nmbd often starting before network was fully up - i.e. before dhcp
handshake was complete.
I had really problem getting my own script to run
After=network-online.target and Before=smbd.service (samba-ad-dc)
Now I managed to get it run ok, but I'm not 100% sure if it is reliable
or just a good luck and coincidence.
My script has:
After=network-online.target
Wants=network-online.target
Before=zfs.target
WantedBy=zfs.target
and samba-ad-dc has:
After=network.target
After=zfs.target
I thought I could get inspiration from distro provided units like smbd
and nmbd, but even they did not behave as expected.
I suspect there might be a problem parsing multiple arguments on single
After/Before line, or that it works only with *.target, but not *.service.
--
Best regards
Vladislav Kurz
More information about the Pkg-systemd-maintainers
mailing list