diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2018-02-20 16:07:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 16:07:49 +0000 |
commit | 17952ee589a2b7f42505aff95d62fe931c26a565 (patch) | |
tree | 0b03b79e7c36ef6206a4e37f04f0c49d11182d4c /nixos/modules/services | |
parent | 34e9d390bd397ab04e3eb5dfcb4174537dffa53c (diff) | |
parent | d77984f571b11811240414d55b61390d9b90b6f1 (diff) | |
download | nixlib-17952ee589a2b7f42505aff95d62fe931c26a565.tar nixlib-17952ee589a2b7f42505aff95d62fe931c26a565.tar.gz nixlib-17952ee589a2b7f42505aff95d62fe931c26a565.tar.bz2 nixlib-17952ee589a2b7f42505aff95d62fe931c26a565.tar.lz nixlib-17952ee589a2b7f42505aff95d62fe931c26a565.tar.xz nixlib-17952ee589a2b7f42505aff95d62fe931c26a565.tar.zst nixlib-17952ee589a2b7f42505aff95d62fe931c26a565.zip |
Merge pull request #35141 from abbradar/dhcpcd-order
dhcpcd service: fix service dependencies when default gateways are set
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/dhcpcd.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index d10b72ecf058..de0aa1a2c2c3 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -156,11 +156,11 @@ in systemd.services.dhcpcd = let cfgN = config.networking; hasDefaultGatewaySet = (cfgN.defaultGateway != null && cfgN.defaultGateway.address != "") - || (cfgN.defaultGateway6 != null && cfgN.defaultGateway6.address != ""); + && (!cfgN.enableIPv6 || (cfgN.defaultGateway6 != null && cfgN.defaultGateway6.address != "")); in { description = "DHCP Client"; - wantedBy = optional (!hasDefaultGatewaySet) "network-online.target"; + wantedBy = [ "multi-user.target" ] ++ optional (!hasDefaultGatewaySet) "network-online.target"; after = [ "network.target" ]; wants = [ "network.target" ]; |