summaryrefslogtreecommitdiff
path: root/net_profile
blob: 8acea401ece5e492b6f6ebf1f4403b90cdb2bd5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

setup_wifi()
{
  sudo wpa_supplicant -D wext -i wlan0 -c ~/.net_profiles/$1.conf &>/tmp/wpa_supplicant.log &
  sudo /etc/init.d/dhcpcd start
  sleep 30
  sudo rc-config start ntp-client
}

if [ ! -f ~/.net_profiles/$1.conf ]; then
  echo "no such profile"
  exit
fi

setup_wifi $1