Created
November 7, 2013 08:22
-
-
Save bmount/7351021 to your computer and use it in GitHub Desktop.
linux wireless wpa quick manual configure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ $# -lt 3 ] | |
| then | |
| echo "usage: ./setup-wifi.sh INTERFACE ACCESS_POINT_SSID PASSPHRASE" | |
| echo "example: ./setup-wifi.sh wlan0 linksys supersecret" | |
| exit; | |
| fi | |
| wpa_passphrase $2 $3 > wifi.conf | |
| wpa_supplicant -i$1 -cwifi.conf -Dwext -B | |
| echo "configuring... waiting 10 seconds" | |
| sleep 10 | |
| sudo dhclient $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment