wpa_supplicant_conf.sh 458 B

12345678910111213141516
  1. #!/bin/bash
  2. #
  3. # Copyright (C) 2010 The Android Open Source Project
  4. #
  5. # This software may be distributed under the terms of the BSD license.
  6. # See README for more details.
  7. #
  8. # Generate a wpa_supplicant.conf from the template.
  9. # $1: the template file name
  10. if [ -n "$WIFI_DRIVER_SOCKET_IFACE" ]
  11. then
  12. sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1 | sed -e "s/wlan0/$WIFI_DRIVER_SOCKET_IFACE/"
  13. else
  14. sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1
  15. fi