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:
parent
30586846ce
commit
3bbbd62cbc
@ -96,6 +96,7 @@ in
|
|||||||
{ description = "DHCP Client";
|
{ description = "DHCP Client";
|
||||||
|
|
||||||
wantedBy = [ "network.target" ];
|
wantedBy = [ "network.target" ];
|
||||||
|
after = [ "systemd-udev-settle.service" ];
|
||||||
|
|
||||||
# Stopping dhcpcd during a reconfiguration is undesirable
|
# Stopping dhcpcd during a reconfiguration is undesirable
|
||||||
# because it brings down the network interfaces configured by
|
# because it brings down the network interfaces configured by
|
||||||
|
@ -90,8 +90,10 @@ in
|
|||||||
services.dbus.packages = [ pkgs.wpa_supplicant ];
|
services.dbus.packages = [ pkgs.wpa_supplicant ];
|
||||||
|
|
||||||
jobs.wpa_supplicant =
|
jobs.wpa_supplicant =
|
||||||
{ startOn = "started network-interfaces";
|
{ description = "WPA Supplicant";
|
||||||
stopOn = "stopping network-interfaces";
|
|
||||||
|
wantedBy = [ "network.target" ];
|
||||||
|
after = [ "systemd-udev-settle.service" ];
|
||||||
|
|
||||||
path = [ pkgs.wpa_supplicant ];
|
path = [ pkgs.wpa_supplicant ];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user