Assembla home | Assembla project page
 

Changeset 26

Show
Ignore:
Timestamp:
08/31/07 20:53:18 (1 year ago)
Author:
evdowizard
Message:

enhance keepalive

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/imagebuilder/files/bin/keepalive

    r16 r26  
    1919# functions 
    2020status() { 
    21 status=$(ping -c 1 -q $target | grep 'transmitted' | awk '{ print $4 }') 
     21status=$(ping -c $1 -q $target | grep 'transmitted' | awk '{ print $4 }') 
    2222} 
    2323 
    2424retry() { 
    25 status 
    26 if [ ! "$status" = "1" ]; then 
     25status 3 
     26if (("$status" < "1")); then 
    2727        reconnect 
    2828fi 
     
    4242# loop 
    4343while [ `cat /proc/diag/led/3g_blue` = "1" ]; do 
    44         status 
    45         if [ ! "$status" = "1" ]; then 
     44        status 1 
     45        if [ "$status" != "1" ]; then 
    4646                retry 
    4747        fi