summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-06-26 13:26:15 +0200
committermakefu <github@syntax-fehler.de>2013-06-26 13:26:15 +0200
commit410ddbd1f77e2f65de6e6b6c86daf031e296028d (patch)
treea4200a85d6dd925c3e71217e7b31a397761717a7
parent7221f3a13a9862c65238c5e7bf31a3356cf46b27 (diff)
fix multiple wifi_init
-rwxr-xr-xusr/bin/autowifi8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr/bin/autowifi b/usr/bin/autowifi
index d9337cf4..1969e650 100755
--- a/usr/bin/autowifi
+++ b/usr/bin/autowifi
@@ -63,7 +63,6 @@ find_count_of_ssid(){
connect_to_network_by_ssid(){
- wifi_init
find_count_of_ssid "$1" | (while read i
do
loop_over_cracks "$i" && exit 0
@@ -76,7 +75,6 @@ connect_to_network_by_ssid(){
}
connect_with_pw(){
- wifi_init
find_count_of_ssid "$1" | (while read i
do
KEY="$2"
@@ -92,8 +90,8 @@ wifi_init(){
. /tmp/${interface}.scan
}
loop_over_networks(){
- wifi_init
+ wifi_init
for i in `seq 1 $WIFI_COUNT`; do
loop_over_cracks "$i"
if [ $? -eq 0 ]; then
@@ -144,9 +142,7 @@ loop_over_cracks(){
# exit 0
#}
-
-
-
+wifi_init
if [ -n "$2" ]; then
echo connecting to $1 with pw $2
connect_with_pw "$1" "$2"