ReferencePlatforms/Test/Maemo: Difference between revisions

Jump to navigation Jump to search
Line 293: Line 293:
  if [ $# -gt 0 ] ; then
  if [ $# -gt 0 ] ; then
     sleep $1
     sleep $1
fi
MAX_PING_ATTEMPTS=50
PING_HOST="10.250.16.48"
count=1
while [ $count -le $MAX_PING_ATTEMPTS ] ; do
        ping -c1 $PING_HOST >/dev/null 2>&1
        if [ $? -eq 0 ] ; then
                break
        fi
        count=`expr $count + 1`
        sleep 2
done
if [ $count -gt $MAX_PING_ATTEMPTS ] ; then
        echo "Can't ping $PING_HOST; rebooting now!"
        reboot
  fi
  fi
   
   
Confirmed users
4,971

edits

Navigation menu