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:
parent
cd976095fe
commit
07e0c0e0a2
@ -93,6 +93,7 @@ let
|
|||||||
after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ];
|
after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ];
|
||||||
before = [ "network.target" "shutdown.target" ];
|
before = [ "network.target" "shutdown.target" ];
|
||||||
wants = [ "network.target" ];
|
wants = [ "network.target" ];
|
||||||
|
partOf = map (i: "network-addresses-${i.name}.service") interfaces;
|
||||||
conflicts = [ "shutdown.target" ];
|
conflicts = [ "shutdown.target" ];
|
||||||
wantedBy = [ "multi-user.target" ] ++ optional hasDefaultGatewaySet "network-online.target";
|
wantedBy = [ "multi-user.target" ] ++ optional hasDefaultGatewaySet "network-online.target";
|
||||||
|
|
||||||
@ -171,8 +172,6 @@ let
|
|||||||
"network-link-${i.name}.service"
|
"network-link-${i.name}.service"
|
||||||
"network.target"
|
"network.target"
|
||||||
];
|
];
|
||||||
# propagate stop and reload from network-setup
|
|
||||||
partOf = [ "network-setup.service" ];
|
|
||||||
# order before network-setup because the routes that are configured
|
# order before network-setup because the routes that are configured
|
||||||
# there may need ip addresses configured
|
# there may need ip addresses configured
|
||||||
before = [ "network-setup.service" ];
|
before = [ "network-setup.service" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user