diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2020-12-22 10:17:32 +0100 |
---|---|---|
committer | rnhmjoj <rnhmjoj@inventati.org> | 2020-12-22 10:17:32 +0100 |
commit | 9f52d1f2342a5c28c36ee3a67953f4f713077235 (patch) | |
tree | 8a820097043d9984e2d52dae0e23a3cba424fd60 | |
parent | 4d0c6c645cfe8410cf7bee5b175906b481dd64c3 (diff) |
Revert "nixos/wireless: fix failure with no interfaces"
This reverts commit 8f177612b14063b644288a5a1058bf47f44b43a5.
Attempting to start any service from udev when systemd-udev-settle is
used at all hangs the boot for 2min. See issue #107341.
-rw-r--r-- | nixos/modules/services/networking/wpa_supplicant.nix | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 3cfcb535ef5b..395139879036 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -233,10 +233,9 @@ in { path = [ pkgs.wpa_supplicant ]; script = '' - if [ -f /etc/wpa_supplicant.conf -a "/etc/wpa_supplicant.conf" != "${configFile}" ]; then - echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead." + if [ -f /etc/wpa_supplicant.conf -a "/etc/wpa_supplicant.conf" != "${configFile}" ] + then echo >&2 "<3>/etc/wpa_supplicant.conf present but ignored. Generated ${configFile} is used instead." fi - iface_args="-s -u -D${cfg.driver} -c ${configFile}" ${if ifaces == [] then '' for i in $(cd /sys/class/net && echo *); do @@ -249,10 +248,6 @@ in { fi fi done - if [ -z "$args" ]; then - echo >&2 "<3>No wireless interfaces detected (yet)." - exit 1 - fi '' else '' args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}" ''} @@ -266,7 +261,7 @@ in { # Restart wpa_supplicant when a wlan device appears or disappears. services.udev.extraRules = '' - ACTION=="add|remove", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", RUN+="/run/current-system/systemd/bin/systemctl restart wpa_supplicant.service" + ACTION=="add|remove", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", RUN+="/run/current-system/systemd/bin/systemctl try-restart wpa_supplicant.service" ''; }; |