Created
March 12, 2012 23:19
-
-
Save limed/2025339 to your computer and use it in GitHub Desktop.
shell script to connect to OSU_Secure wireless
This file contains 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 | |
INTERFACE=$1 | |
WHOAMI=`whoami` | |
if [ $WHOAMI != 'root' ]; then | |
echo "Must run as root" | |
exit 1 | |
fi | |
if [ $# != 1 ]; then | |
echo "Usage: $0 [interface]" | |
exit 1 | |
else | |
# make sure wpa_supplicant isn't running | |
pkill wpa_supplicant | |
wpa_supplicant -D wext -i $INTERFACE -c /etc/wpa_supplicant/wpa_supplicant.conf -B | |
dhclient $INTERFACE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment