From 8aa40a6264318236c4c237e17b2dd1283fa331c0 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 10 Feb 2015 13:48:26 -0800 Subject: [PATCH] make ping only ping once, and wait for a max of three seconds for a response --- sshsendmail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshsendmail b/sshsendmail index 62efbb4..c9c4530 100755 --- a/sshsendmail +++ b/sshsendmail @@ -164,7 +164,7 @@ EOF $Data::Dumper::Useqq=0; print STDERR Dumper(\@ssh_arguments); -qx(ping -q -c 3 $hostname 2>/dev/null); +qx(ping -q -w 3 -c 1 $hostname 2>/dev/null); if ($?) { syslog(LOG_WARNING,"${0}: Failed: unable to ping $hostname\n"); exit (9); -- 2.39.2