examples/var_service/supplicant_if: new service example

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2016-09-20 18:09:00 +02:00
parent 92d98f0612
commit d8330ca4a4
6 changed files with 83 additions and 0 deletions

View File

@@ -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