summaryrefslogtreecommitdiffstats
path: root/src/8021x
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2009-05-18 08:59:34 +0200
committerJames Rayner <james@archlinux.org>2009-05-18 08:59:34 +0200
commitbb3bade410cbfb4d19b65884b6525be7603dd686 (patch)
treed0defa7cffdfcbc084bf2124b661de249f8e79a9 /src/8021x
parent92d6bde2e758466c5e524f84e424b7a98c749863 (diff)
downloadnetctl-bb3bade410cbfb4d19b65884b6525be7603dd686.tar.gz
netctl-bb3bade410cbfb4d19b65884b6525be7603dd686.tar.xz
wireless: check if iface is real, stop wpa_supplicant on failures
Diffstat (limited to 'src/8021x')
-rw-r--r--src/8021x10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/8021x b/src/8021x
index 8dbff29..75030e9 100644
--- a/src/8021x
+++ b/src/8021x
@@ -34,3 +34,13 @@ start_wpa()
return 1
fi
}
+
+stop_wpa()
+{
+ wpa_cli terminate &> /dev/null
+ if [[ -f /var/run/wpa_supplicant_$1.pid ]]; then
+ kill $(cat /var/run/wpa_supplicant_$1.pid) &>/dev/null &
+ fi
+}
+
+# vim: set ts=4 et sw=4 ft=sh: