blob: 279d18af5c99e48a60df1f10a56c9605afd26cca [file] [log] [blame]
#!/bin/sh
exec 2>&1
exec </dev/null
pwd="$PWD"
if="${PWD##*/dhcp_}"
echo "* Upping iface $if"
# "or sleep" idiom prevents rapid respawning if iface does not exist
ip link set dev "$if" up || { sleep 5; exit; }
##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