3
0
Fork 0
forked from mirrors/nixpkgs

nixos/wpa_supplicant: fix #61391

This commit is contained in:
Linus Heckemann 2020-01-12 13:28:50 +01:00
parent e1eedf29e5
commit bbd6d219e4

View file

@ -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
'';
};