diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-02-23 16:01:36 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2017-02-23 16:07:40 +0100 |
commit | 66f553974b74378c524f08b3c7d745907927e6c4 (patch) | |
tree | b4cc29efadf48aa2dd3dc6900f0a5e859eaf57fb /nixos/modules/services | |
parent | 0cfa40d1229d20af816e299d77d09819934231e9 (diff) | |
download | nixlib-66f553974b74378c524f08b3c7d745907927e6c4.tar nixlib-66f553974b74378c524f08b3c7d745907927e6c4.tar.gz nixlib-66f553974b74378c524f08b3c7d745907927e6c4.tar.bz2 nixlib-66f553974b74378c524f08b3c7d745907927e6c4.tar.lz nixlib-66f553974b74378c524f08b3c7d745907927e6c4.tar.xz nixlib-66f553974b74378c524f08b3c7d745907927e6c4.tar.zst nixlib-66f553974b74378c524f08b3c7d745907927e6c4.zip |
dhcpcd service: fix network-online.target integration
When dhcpcd instead of networkd is used, the network-online.target behaved the same as network.target, resulting in broken services that need a working network connectivity when being started. This commit makes dhcpcd wait for a lease and makes it wanted by network-online.target. In turn, network-online.target is now wanted by multi-user.target, so it will be activated at every boot.
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 87c0aa50a1ff..7eeceb7407c6 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -157,7 +157,7 @@ in systemd.services.dhcpcd = { description = "DHCP Client"; - wantedBy = [ "multi-user.target" ]; + wantedBy = [ "network-online.target" ]; after = [ "network.target" ]; wants = [ "network.target" ]; @@ -173,7 +173,7 @@ in serviceConfig = { Type = "forking"; PIDFile = "/run/dhcpcd.pid"; - ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --quiet ${optionalString cfg.persistent "--persistent"} --config ${dhcpcdConf}"; + ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd -w --quiet ${optionalString cfg.persistent "--persistent"} --config ${dhcpcdConf}"; ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind"; Restart = "always"; }; |