3
0

run 439 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. exec 2>&1
  3. exec </dev/null
  4. pwd="$PWD"
  5. if="${PWD##*/dhcp_}"
  6. echo "* Upping iface $if"
  7. # "or sleep" idiom prevents rapid respawning if iface does not exist
  8. ip link set dev "$if" up || exec sleep 5
  9. ##echo "* Powersave disable on $if"
  10. ##iw dev "$if" set power_save off
  11. echo "* Starting wpa_supplicant on $if [$$]"
  12. exec \
  13. env - PATH="$PATH" \
  14. softlimit \
  15. setuidgid root \
  16. wpa_supplicant -i "$if" -c "$pwd/wpa_supplicant.conf" -d