diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-01-10 13:46:34 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-01-10 13:46:34 +0100 |
commit | 3bbbd62cbcfca6ba5c907dc6c350ff319037bad9 (patch) | |
tree | 372874d8aa217e275e11b2388a853be75ebd13d0 /modules/services | |
parent | 30586846cef9079f22849ec0c19c043d0e2dec8b (diff) | |
download | nixlib-3bbbd62cbcfca6ba5c907dc6c350ff319037bad9.tar nixlib-3bbbd62cbcfca6ba5c907dc6c350ff319037bad9.tar.gz nixlib-3bbbd62cbcfca6ba5c907dc6c350ff319037bad9.tar.bz2 nixlib-3bbbd62cbcfca6ba5c907dc6c350ff319037bad9.tar.lz nixlib-3bbbd62cbcfca6ba5c907dc6c350ff319037bad9.tar.xz nixlib-3bbbd62cbcfca6ba5c907dc6c350ff319037bad9.tar.zst nixlib-3bbbd62cbcfca6ba5c907dc6c350ff319037bad9.zip |
Start dhcpcd/wpa_supplicant after systemd-udev-settle
This is necessary to prevent a race. Udev 197 has a new naming scheme for network devices, so it will rename (say) eth0 to eno0. This fails with "error changing net interface name eth0 to eno1: Device or resource busy" if another process has opened the interface in the meantime.
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/networking/dhcpcd.nix | 1 | ||||
-rw-r--r-- | modules/services/networking/wpa_supplicant.nix | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/services/networking/dhcpcd.nix b/modules/services/networking/dhcpcd.nix index cf7f621a85d5..739ba95d5e34 100644 --- a/modules/services/networking/dhcpcd.nix +++ b/modules/services/networking/dhcpcd.nix @@ -96,6 +96,7 @@ in { description = "DHCP Client"; wantedBy = [ "network.target" ]; + after = [ "systemd-udev-settle.service" ]; # Stopping dhcpcd during a reconfiguration is undesirable # because it brings down the network interfaces configured by diff --git a/modules/services/networking/wpa_supplicant.nix b/modules/services/networking/wpa_supplicant.nix index b338e08113e5..4f8ae55d2090 100644 --- a/modules/services/networking/wpa_supplicant.nix +++ b/modules/services/networking/wpa_supplicant.nix @@ -90,8 +90,10 @@ in services.dbus.packages = [ pkgs.wpa_supplicant ]; jobs.wpa_supplicant = - { startOn = "started network-interfaces"; - stopOn = "stopping network-interfaces"; + { description = "WPA Supplicant"; + + wantedBy = [ "network.target" ]; + after = [ "systemd-udev-settle.service" ]; path = [ pkgs.wpa_supplicant ]; |