[systemd-devel] Starting a service before any networking

Mark Rogers mark at more-solutions.co.uk
Thu Sep 28 10:48:15 UTC 2023


On Thu, 28 Sept 2023 at 11:16, Mark Rogers <mark at more-solutions.co.uk>
wrote:

> DefaultDependencies=no
>

FWIW I tried:
    DefaultDependencies=no
    Before=network-pre.target
    Wants=network-pre.target
and
    DefaultDependencies=no
    Before=network-pre.target
    Wants=network-pre.target local-fs.target

.. and in both cases my unit still started after dhcpcd (albeit that with
my "ip link set eth0 down/up" hack the network worked OK).

I have left it as
    DefaultDependencies=no
    Before=network-pre.target dhcpcd.service
    Wants=network-pre.target local-fs.target

.. although a lot of that seems redundant, really it's just the
Before=dhcpcd.service that seems to be achieving anything.

-- 
Mark Rogers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230928/54d23223/attachment.htm>


More information about the systemd-devel mailing list