massflash.sh 506 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. flashscript=`dirname $0`
  3. flashscript="${flashscript}/autoflash.sh"
  4. true=`which true`
  5. if [ ! -x $flashscript ]; then
  6. echo "Error, failed to find autoflash support script at '$flashscript'"
  7. exit 1
  8. fi
  9. while $true; do
  10. echo -en "Waiting for virgin router to appear on 192.168.0.1 ..."
  11. while ! ping -n -c 1 -W 1 192.168.0.1 > /dev/null; do
  12. echo -en "."
  13. sleep 1
  14. done
  15. echo " found"
  16. $flashscript
  17. echo "-----------------------------------------------------------------------"
  18. echo
  19. done