[systemd-devel] Ensuring that a unit starts before any networking

Michael Chapman mike at very.puzzling.org
Sat Jun 27 12:08:06 UTC 2020


On Sat, 27 Jun 2020, Mark Rogers wrote:
> On Sat, 27 Jun 2020 at 11:06, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
> > You should use Before=network-pre.target, Wants=network-pre.target.
> 
> Thanks, tried that but still not working:

It could very well be because of the dhcpcd.service you're using.

I don't know what it's like on Raspbian, but on Debian this unit appears 
to have no ordering with respect to network.target or network-pre.target 
at all.

On Fedora, this unit is Before=network.target, but it has no ordering with 
respect to network-pre.target. So even there this wouldn't help you.

In my experience a lot of network management software's systemd units 
don't use these target units properly.


More information about the systemd-devel mailing list