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

Mark Rogers mark at more-solutions.co.uk
Sat Jun 27 14:54:26 UTC 2020


On Sat, 27 Jun 2020 at 13:04, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> All other units that implement networking must have
> After=network-pre.target for the above to do anything. Do they?

.. and ..

On Sat, 27 Jun 2020 at 13:08, Michael Chapman <mike at very.puzzling.org> wrote:
> 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.

Ah, therein lies my failing - I assumed OS supplied units wouldn't
need adapting...

Adding After=network-pre.target to dhcpcd.service seems to have
resolved it, and taught me a lesson in the process.

Is there an obvious reason I'm missing why these aren't distro
defaults? (Is this a "bug" in the network management tools' unit
files? Would "fixing" this at the distro level have any likely side
effects?)

-- 
Mark Rogers


More information about the systemd-devel mailing list