2016-09-20 21:39:00 +05:30
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
exec 2>&1
|
|
|
|
exec </dev/null
|
|
|
|
|
|
|
|
pwd="$PWD"
|
|
|
|
|
|
|
|
if="${PWD##*/dhcp_}"
|
|
|
|
|
|
|
|
echo "* Upping iface $if"
|
2019-02-02 23:36:19 +05:30
|
|
|
# "or sleep" idiom prevents rapid respawning if iface does not exist
|
2019-04-21 18:00:19 +05:30
|
|
|
ip link set dev "$if" up || exec sleep 5
|
2016-09-20 21:39:00 +05:30
|
|
|
|
|
|
|
##echo "* Powersave disable on $if"
|
|
|
|
##iw dev "$if" set power_save off
|
|
|
|
|
2019-04-05 22:08:12 +05:30
|
|
|
echo "* Starting wpa_supplicant on $if [$$]"
|
2016-09-20 21:39:00 +05:30
|
|
|
exec \
|
|
|
|
env - PATH="$PATH" \
|
|
|
|
softlimit \
|
|
|
|
setuidgid root \
|
|
|
|
wpa_supplicant -i "$if" -c "$pwd/wpa_supplicant.conf" -d
|