blob: bc16fb606335ece5937f424287423241983816dc [file] [log] [blame]
Denys Vlasenkod8330ca2016-09-20 18:09:00 +02001#!/bin/sh
2
3exec 2>&1
4exec </dev/null
5
6pwd="$PWD"
7
8if="${PWD##*/dhcp_}"
9
10echo "* Upping iface $if"
Denys Vlasenkoe17e8d42019-02-02 19:06:19 +010011# "or sleep" idiom prevents rapid respawning if iface does not exist
12ip link set dev "$if" up || { sleep 5; exit; }
Denys Vlasenkod8330ca2016-09-20 18:09:00 +020013
14##echo "* Powersave disable on $if"
15##iw dev "$if" set power_save off
16
Denys Vlasenko1e474d32019-04-05 18:38:12 +020017echo "* Starting wpa_supplicant on $if [$$]"
Denys Vlasenkod8330ca2016-09-20 18:09:00 +020018exec \
19env - PATH="$PATH" \
20softlimit \
21setuidgid root \
22wpa_supplicant -i "$if" -c "$pwd/wpa_supplicant.conf" -d