diff options
author | jeandebogue <jeandebogue@msn.com> | 2012-02-21 08:55:49 +0100 |
---|---|---|
committer | jeandebogue <jeandebogue@msn.com> | 2012-02-21 08:55:49 +0100 |
commit | d4e37b2edd51ccc39e5d6f912d8079b3d447ee7b (patch) | |
tree | 9dafd24be84026d91b084d92f922bab3045f05e6 /usr | |
parent | 1d50d8d9e96baa18cf8998d7756a3cca95789ef7 (diff) | |
download | pfsense-d4e37b2edd51ccc39e5d6f912d8079b3d447ee7b.zip pfsense-d4e37b2edd51ccc39e5d6f912d8079b3d447ee7b.tar.gz |
Remove the -S $SRCIP to ping and added a timeout.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/bin/ping_hosts.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/bin/ping_hosts.sh b/usr/local/bin/ping_hosts.sh index c0de5a1..7b24fc2 100755 --- a/usr/local/bin/ping_hosts.sh +++ b/usr/local/bin/ping_hosts.sh @@ -75,7 +75,7 @@ for TOPING in $PINGHOSTS ; do fi echo Processing $DSTIP # Look for a service being down - $PINGCMD -c $COUNT -S $SRCIP $DSTIP + $PINGCMD -c $COUNT -t 2 $DSTIP if [ $? -eq 0 ]; then # Host is up # Read in previous status @@ -104,7 +104,7 @@ for TOPING in $PINGHOSTS ; do fi echo "Checking ping time $DSTIP" # Look at ping values themselves - PINGTIME=`$PINGCMD -c 1 -S $SRCIP $DSTIP | awk '{ print $7 }' | grep time | cut -d "=" -f2` + PINGTIME=`$PINGCMD -c 1 -t 2 $DSTIP | awk '{ print $7 }' | grep time | cut -d "=" -f2` echo "Ping returned $?" echo $PINGTIME > /var/db/pingmsstatus/$DSTIP if [ "$THRESHOLD" != "" ]; then |