aboutsummaryrefslogtreecommitdiff
path: root/examples/var_service/supplicant_if/run
diff options
context:
space:
mode:
Diffstat (limited to 'examples/var_service/supplicant_if/run')
-rwxr-xr-xexamples/var_service/supplicant_if/run21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/var_service/supplicant_if/run b/examples/var_service/supplicant_if/run
new file mode 100755
index 000000000..45211e001
--- /dev/null
+++ b/examples/var_service/supplicant_if/run
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+exec 2>&1
+exec </dev/null
+
+pwd="$PWD"
+
+if="${PWD##*/dhcp_}"
+
+echo "* Upping iface $if"
+ip link set dev "$if" up
+
+##echo "* Powersave disable on $if"
+##iw dev "$if" set power_save off
+
+echo "* Starting wpa_supplicant"
+exec \
+env - PATH="$PATH" \
+softlimit \
+setuidgid root \
+wpa_supplicant -i "$if" -c "$pwd/wpa_supplicant.conf" -d