From 52a4d694b60b49d93c9b044f7df21a02a02e0ee8 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 18 Sep 2003 12:22:52 -0500 Subject: [svn-r7487] Purpose: Improvement Description: The -w timeout option is not supported by all hosts. Added the "ping -c 3" possible PING command. Platforms tested: Tested in eirene by hand only. Misc. update: --- bin/runtest | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/runtest b/bin/runtest index a8ae9fe..e42a13e 100755 --- a/bin/runtest +++ b/bin/runtest @@ -153,13 +153,17 @@ PRINT_TRAILER() CHECK_RSH() { # Figure out how to use ping command in this host. - # Some hosts use "ping host count", some use "ping -c count host" - # Test "ping -c ..." style first because some '-c' machines treat - # the command 'ping localhost 3' means to ping host '3'. + # Some hosts use "ping host count", some use "ping -c count host". + # Test "ping -c 3 -w 5" since it has timeout feature. + # Test "ping -c ..." style before "ping host 3" because some machines + # that recognize -c treat 'ping localhost 3' as to ping host '3'. if [ -z "$PING" ]; then if ping -c 3 -w 5 localhost >/dev/null 2>&1; then PING='ping -c 3 -w 5' PINGCOUNT= + elif ping -c 3 localhost >/dev/null 2>&1; then + PING='ping -c 3' + PINGCOUNT= elif ping localhost 3 >/dev/null 2>&1; then PING=ping PINGCOUNT=3 -- cgit v0.12