From 002ffea364331adcb5dccd87dddf69d5f5912271 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Jul 2013 13:52:46 +0200 Subject: [PATCH] wpa_supplicant: Fix wlan interface detection on Linux 3.4 Linux 3.4 apparently doesn't have the "wireless" file. --- modules/services/networking/wpa_supplicant.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/services/networking/wpa_supplicant.nix b/modules/services/networking/wpa_supplicant.nix index 11f8778a0abe..dca398dd8be2 100644 --- a/modules/services/networking/wpa_supplicant.nix +++ b/modules/services/networking/wpa_supplicant.nix @@ -110,7 +110,9 @@ in '' ${if ifaces == [] then '' for i in $(cd /sys/class/net && echo *); do - if [ -e /sys/class/net/$i/wireless ]; then + DEVTYPE= + source /sys/class/net/$i/uevent + if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then ifaces="$ifaces''${ifaces:+ -N} -i$i" fi done