diff options
author | Robin Gloster <mail@glob.in> | 2020-01-13 12:07:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 12:07:54 +0100 |
commit | 8305186bb44e73490ccb9c984c3d4fcaaf21da78 (patch) | |
tree | 7851b04274600503fe8f8e3338a69bf793a152d7 /nixos | |
parent | 247c25d302f7fa04e354261340d875a8214ceecc (diff) | |
parent | bbd6d219e4be16f9746ba587c4c0a37ee354c57b (diff) |
Merge pull request #77554 from lheckemann/fix-wpa-multiple1
nixos/wpa_supplicant: fix use with multiple interfaces
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/wpa_supplicant.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 8f05c3949fba..de0f11595a94 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -233,6 +233,7 @@ in { path = [ pkgs.wpa_supplicant ]; script = '' + iface_args="-s -u -D${cfg.driver} -c ${configFile}" ${if ifaces == [] then '' for i in $(cd /sys/class/net && echo *); do DEVTYPE= @@ -240,14 +241,14 @@ in { if [ -e "$UEVENT_PATH" ]; then source "$UEVENT_PATH" if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then - ifaces="$ifaces''${ifaces:+ -N} -i$i" + args+="''${args:+ -N} -i$i $iface_args" fi fi done '' else '' - ifaces="${concatStringsSep " -N " (map (i: "-i${i}") ifaces)}" + args="${concatMapStringsSep " -N " (i: "-i${i} $iface_args") ifaces}" ''} - exec wpa_supplicant -s -u -D${cfg.driver} -c ${configFile} $ifaces + exec wpa_supplicant $args ''; }; |