units: drop Before=sockets.target from networkd resolve hook

Otherwise, it introduces cyclic dependencies:
```
systemd[1]: sockets.target: Found ordering cycle:
    systemd-networkd-resolve-hook.socket/start after network-pre.target/start after
    iptables.service/start after basic.target/start after sockets.target/start -
    after systemd-networkd-resolve-hook.socket
systemd[1]: sockets.target: Job systemd-networkd-resolve-hook.socket/start deleted
    to break ordering cycle starting with sockets.target/start
```

Follow-up for 37adb410a2.
Fixes #42353.

(cherry picked from commit 20572a8938)
(cherry picked from commit 26c0d2d61c)
This commit is contained in:
Yu Watanabe
2026-05-29 01:12:29 +09:00
committed by Luca Boccassi
parent 4089f60df5
commit 479a2dcb12

View File

@@ -13,7 +13,7 @@ Documentation=man:systemd-networkd.service(8)
ConditionCapability=CAP_NET_ADMIN
DefaultDependencies=no
After=network-pre.target
Before=sockets.target shutdown.target
Before=shutdown.target
Conflicts=shutdown.target
[Socket]