diff options
author | lassulus <lassulus@googlemail.com> | 2013-05-24 22:04:56 +0200 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2013-05-24 22:04:56 +0200 |
commit | d1512e39e5d847fe5c51bb085213bde6913dedc8 (patch) | |
tree | 7e6b85fd9bf84a9cd34f7910e5d9a21362a2f4a9 /usr/bin/autowifi | |
parent | aaee76eac5435db5a9bf0d80224bd7eb9d648c03 (diff) |
autoconnect now with led-managment, profile fixed
Diffstat (limited to 'usr/bin/autowifi')
-rwxr-xr-x | usr/bin/autowifi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/bin/autowifi b/usr/bin/autowifi index 891e8938..a960bf01 100755 --- a/usr/bin/autowifi +++ b/usr/bin/autowifi @@ -74,6 +74,7 @@ iwlist_scan(){ } crack_wifi(){ #SSID MAC CHANNEL ENCRYPTION WPA WPA2 + all_led timer if [ "$4" == off ];then encr=open elif [ "$6" -eq 1 ]; then @@ -88,12 +89,12 @@ crack_wifi(){ ret=$? if [ $ret -eq 0 ];then connect_wifi "$3" "$1" $encr "$key" - sleep 10 + sleep 30 if check_gateway; then (cat /etc/autowifi/wifi_keys | grep -v "$1|$2|" ; echo "$1|$2|$key" ) | sort | uniq > /etc/autowifi/wifi_keys2 mv /etc/autowifi/wifi_keys2 /etc/autowifi/wifi_keys echo "yay gateway" - check_internet && return 0 + check_internet && all_led none && return 0 fi fi done @@ -123,6 +124,7 @@ loop_over_networks while sleep 60; do if ! check_internet; then + all_led default-on iwlist_scan > /tmp/${wifi}.scan loop_over_networks fi |