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.
This commit is contained in:
Eelco Dolstra 2013-01-10 13:46:34 +01:00
parent 30586846ce
commit 3bbbd62cbc
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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 ];