Author: biurrun Date: Thu Oct 15 22:43:00 2009 New Revision: 1207 Log: whitespace cosmetics Modified: trunk/tools/auto-handover.sh Modified: trunk/tools/auto-handover.sh ============================================================================== --- trunk/tools/auto-handover.sh Thu Oct 15 22:23:00 2009 (r1206) +++ trunk/tools/auto-handover.sh Thu Oct 15 22:43:00 2009 (r1207) @@ -20,26 +20,26 @@ if [ "${result[0]}" == "NONE" ]; then echo "No PISA access points nearby" else - if [ "$last_result" != "${result[0]}" ]; then - echo "Changing to " ${result[1]} - iwconfig $WIFI_IF ap ${result[0]} essid ${result[1]} + if [ "$last_result" != "${result[0]}" ]; then + echo "Changing to " ${result[1]} + iwconfig $WIFI_IF ap ${result[0]} essid ${result[1]} - if [ "$last_result" = "NONE" ]; then - ifconfig $WIFI_IF $IP netmask $NETMASK - route add default gw $AP_IP $WIFI_IF - route del default eth0 - else - arp -d $AP_IP 2> /dev/null - fi - - last_result=${result[0]} - - # We don't want to change AP immediately, do we!? - sleep 10 + if [ "$last_result" = "NONE" ]; then + ifconfig $WIFI_IF $IP netmask $NETMASK + route add default gw $AP_IP $WIFI_IF + route del default eth0 else - echo "Access Point is still best" - # Let's check for better AP after a short delay - sleep 1 + arp -d $AP_IP 2> /dev/null fi + + last_result=${result[0]} + + # We don't want to change AP immediately, do we!? + sleep 10 + else + echo "Access Point is still best" + # Let's check for better AP after a short delay + sleep 1 + fi fi done