summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-08-22 20:14:40 +0100
committerPatrick Simianer <p@simianer.de>2014-08-22 20:14:40 +0100
commit06e74e672e42d368932729a8f3788346203cc125 (patch)
tree458acb244313326b231688708978d03426bdbf1d
parent0c96fd1dc910c4cd80189e8cb5408a08bcdb4789 (diff)
net-profile
-rwxr-xr-xnet-profile7
1 files changed, 6 insertions, 1 deletions
diff --git a/net-profile b/net-profile
index 3234f8c..874aaac 100755
--- a/net-profile
+++ b/net-profile
@@ -3,12 +3,17 @@
setup_wifi()
{
- sudo wpa_supplicant -D wext -i wlan0 -c ~/.net_profiles/$1.conf &>/dev/null &
+ 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