aboutsummaryrefslogtreecommitdiff
path: root/repos/extra/wpa_supplicant/run
diff options
context:
space:
mode:
Diffstat (limited to 'repos/extra/wpa_supplicant/run')
-rwxr-xr-xrepos/extra/wpa_supplicant/run12
1 files changed, 12 insertions, 0 deletions
diff --git a/repos/extra/wpa_supplicant/run b/repos/extra/wpa_supplicant/run
new file mode 100755
index 00000000..65049c10
--- /dev/null
+++ b/repos/extra/wpa_supplicant/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+[ -f /etc/rc.conf ] && . /etc/rc.conf
+if [ ! "$WIFI_DEV" ]; then
+ for i in /sys/class/net/*; do
+ [ -e $i/phy80211 ] && {
+ WIFI_DEV=${i##*/}
+ break
+ }
+ done
+fi
+[ "$WIFI_DEV" ] || exit 1
+exec wpa_supplicant -D nl80211 -i $WIFI_DEV -c /etc/wpa_supplicant.conf 2>&1