xref: /freebsd/contrib/wpa/wpa_supplicant/wpa_supplicant_conf.sh (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
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
9# Generate a wpa_supplicant.conf from the template.
10# $1: the template file name
11if [ -n "$WIFI_DRIVER_SOCKET_IFACE" ]
12then
13  sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1 | sed -e "s/wlan0/$WIFI_DRIVER_SOCKET_IFACE/"
14else
15  sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1
16fi
17