Browse Source

scripts: use sleep in order to have a working ^C when waiting for successful ping

Helge Jung 10 years ago
parent
commit
885c6f4e86
2 changed files with 4 additions and 2 deletions
  1. 2 1
      autoflash.sh
  2. 2 1
      massflash.sh

+ 2 - 1
autoflash.sh

@@ -60,8 +60,9 @@ echo "done :)"
 
 echo -en "waiting for router to come up again "
 
-while ! ping -n -c 1 -W 3 192.168.1.1 > /dev/null; do
+while ! ping -n -c 1 -W 2 192.168.1.1 > /dev/null; do
 	echo -en "."
+	sleep 1
 done
 
 echo " \o/"

+ 2 - 1
massflash.sh

@@ -13,10 +13,11 @@ while /bin/true; do
 	echo -en "Waiting for virgin router to appear on 192.168.0.1 ..."
 	while ! ping -n -c 1 -W 1 192.168.0.1 > /dev/null; do
 		echo -en "."
+		sleep 1
 	done
 	echo " found"
 
 	$flashscript
 	echo "-----------------------------------------------------------------------"
 	echo
-done
+done