netns: ensure that network.target depends on network-pre.target (why doesnt it by default?)
this should fix that servo tries to start wg-ovpns before the netns is configured
This commit is contained in:
@@ -90,6 +90,8 @@ let
|
|||||||
# ordered ambiguously w.r.t. network-local-commands (a dep of "network.target").
|
# ordered ambiguously w.r.t. network-local-commands (a dep of "network.target").
|
||||||
systemd.services.network-local-commands.wantedBy = [ "network-pre.target" ];
|
systemd.services.network-local-commands.wantedBy = [ "network-pre.target" ];
|
||||||
systemd.services.network-local-commands.before = [ "network-pre.target" ];
|
systemd.services.network-local-commands.before = [ "network-pre.target" ];
|
||||||
|
systemd.targets.network-pre.wantedBy = [ "network.target" ];
|
||||||
|
systemd.targets.network-pre.before = [ "network.target" ];
|
||||||
|
|
||||||
# create a new routing table that we can use to proxy traffic out of the root namespace
|
# create a new routing table that we can use to proxy traffic out of the root namespace
|
||||||
# through the wireguard namespaces, and to the WAN via VPN.
|
# through the wireguard namespaces, and to the WAN via VPN.
|
||||||
@@ -115,6 +117,7 @@ in
|
|||||||
networking.iproute2.rttablesExtraConfig = f.networking.iproute2.rttablesExtraConfig;
|
networking.iproute2.rttablesExtraConfig = f.networking.iproute2.rttablesExtraConfig;
|
||||||
networking.iproute2.enable = f.networking.iproute2.enable;
|
networking.iproute2.enable = f.networking.iproute2.enable;
|
||||||
systemd.services.network-local-commands = f.systemd.services.network-local-commands;
|
systemd.services.network-local-commands = f.systemd.services.network-local-commands;
|
||||||
|
systemd.targets.network-pre = f.systemd.targets.network-pre;
|
||||||
};
|
};
|
||||||
in take (sane-lib.mkTypedMerge take configs);
|
in take (sane-lib.mkTypedMerge take configs);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user