aboutsummaryrefslogtreecommitdiff
path: root/misc/wifi
blob: cfe6151d0b749e7a00f271cf429454e5e756672f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
#
# Wifi initializer.
#

#DEVICE="ath0"
DEVICE="wlan0"

if [ ! -z "$1" ]; then
  read -sp "Enter the WPA passphrase: " PASS
  echo ""
  wpa_passphrase $1 $PASS
elif [ -f "wpa_supplicant.conf" ]; then
  sudo wpa_supplicant -B -Dwext -i$DEVICE -cwpa_supplicant.conf
  sudo dhclient $DEVICE
fi