From: Nicolas Zingilé Date: Wed, 29 Oct 2014 16:37:53 +0000 (+0100) Subject: corrected some wifi connection mistakes X-Git-Tag: submit/tizen_common/20141030.095726^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b4973013b41e34bc881f0825fe5669535db1692;p=profile%2Fcommon%2Fsystem-installer.git corrected some wifi connection mistakes Change-Id: I8127a418248e1a0e81c8dbd8002dee03224e39f5 Signed-off-by: Nicolas Zingilé --- diff --git a/scripts/system-installer b/scripts/system-installer index 01d46c9..db90e3d 100755 --- a/scripts/system-installer +++ b/scripts/system-installer @@ -6,7 +6,7 @@ # License: GPLv2 # Authors: Thibault Guittet # Nicolas Zingilé -# Stéphane Desneux +# Stéphane Desneux # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, @@ -41,7 +41,7 @@ bmaptool_failure="" # util executables paths utilspath=/usr/lib/system-installer url_util=$utilspath/url-util -wifi_util_util=$utilspath/wifi-util +wifi_util=$utilspath/wifi-util kbd_util=$utilspath/keyboard-util disk_util=$utilspath/disk-util @@ -88,11 +88,8 @@ function test_connection { echo "Checking for internet connection, please wait" sleep 5 until curl --connect-timeout 10 -s "http://download.tizen.org/" > /dev/null; do - while :; do - $wifi_util && break - [ $? -eq 1 ] && sigint_handler - done - echo "Checking for internet connection, please wait" + $wifi_util && break + [ $? -eq 1 ] && sigint_handler done } diff --git a/scripts/wifi-util b/scripts/wifi-util index 1f20d20..bb0cf55 100755 --- a/scripts/wifi-util +++ b/scripts/wifi-util @@ -14,8 +14,16 @@ passphrase="" trap "exit 2" SIGINT +while [[ -z $(lsmod | grep "^iwlmvm") ]] +do + sleep 0.5 + echo -n "." +done + +sleep 2 + while [ 1 ]; do - $wifi scan > $data_out + $wifi scan > $data_out 2> /dev/null ap=$(grep "wifi_" "$data_out" | sed "s/^\* /\t/" | sed "s/^\*R/\t/" | sed "s/^\*A/\t/" | awk '{$(NF--)=""; print}' | sed "s/^\(.*\) $/\"\1\"/g") rm -f $data_out 2> /dev/null