3
0
Fork 0
forked from mirrors/nixpkgs

network-interfaces-scripted: fix NixOS/nixops#640

Reverse the PartOf dependency between network-setup and network-addresses-*

This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk
at the NixCon 2017 hackathon.
This commit is contained in:
Bas van Dijk 2017-10-30 17:35:14 +01:00 committed by Domen Kožar
parent cd976095fe
commit 07e0c0e0a2

View file

@ -93,6 +93,7 @@ let
after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ];
before = [ "network.target" "shutdown.target" ];
wants = [ "network.target" ];
partOf = map (i: "network-addresses-${i.name}.service") interfaces;
conflicts = [ "shutdown.target" ];
wantedBy = [ "multi-user.target" ] ++ optional hasDefaultGatewaySet "network-online.target";
@ -171,8 +172,6 @@ let
"network-link-${i.name}.service"
"network.target"
];
# propagate stop and reload from network-setup
partOf = [ "network-setup.service" ];
# order before network-setup because the routes that are configured
# there may need ip addresses configured
before = [ "network-setup.service" ];