diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2004-02-25 07:49:12 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2004-02-25 07:49:12 (GMT) |
commit | 8809baebc0d825b5ca966a4e7f412aa2ec627a2a (patch) | |
tree | c5571a2708a744e1e168d5355fc0b6d59b712d26 /configure.in | |
parent | b8c407e0f5df94186363ac16c610bcef85745aa5 (diff) | |
download | monitoring-plugins-8809baebc0d825b5ca966a4e7f412aa2ec627a2a.tar.gz |
pass timeout to ping if supported with -w parameter (linux)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@824 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 5dc04f9..3f90929 100644 --- a/configure.in +++ b/configure.in | |||
@@ -871,6 +871,7 @@ AC_ARG_WITH(ping_command, | |||
871 | 871 | ||
872 | AC_MSG_CHECKING(for ICMP ping syntax) | 872 | AC_MSG_CHECKING(for ICMP ping syntax) |
873 | ac_cv_ping_packets_first=no | 873 | ac_cv_ping_packets_first=no |
874 | ac_cv_ping_has_timeout=no | ||
874 | if test -n "$with_ping_command" | 875 | if test -n "$with_ping_command" |
875 | then | 876 | then |
876 | AC_MSG_RESULT([(command-line) $with_ping_command]) | 877 | AC_MSG_RESULT([(command-line) $with_ping_command]) |
@@ -887,6 +888,14 @@ then | |||
887 | ac_cv_ping_packets_first=yes | 888 | ac_cv_ping_packets_first=yes |
888 | AC_MSG_RESULT([$with_ping_command]) | 889 | AC_MSG_RESULT([$with_ping_command]) |
889 | 890 | ||
891 | elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ | ||
892 | egrep -i "^round-trip|^rtt" >/dev/null | ||
893 | then | ||
894 | with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" | ||
895 | ac_cv_ping_packets_first=yes | ||
896 | ac_cv_ping_has_timeout=yes | ||
897 | AC_MSG_RESULT([$with_ping_command]) | ||
898 | |||
890 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ | 899 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ |
891 | egrep -i "^round-trip|^rtt" >/dev/null | 900 | egrep -i "^round-trip|^rtt" >/dev/null |
892 | then | 901 | then |
@@ -952,6 +961,12 @@ then | |||
952 | [Define if packet count must precede host]) | 961 | [Define if packet count must precede host]) |
953 | fi | 962 | fi |
954 | 963 | ||
964 | if test "x$ac_cv_ping_has_timeout" != "xno" | ||
965 | then | ||
966 | AC_DEFINE(PING_HAS_TIMEOUT,1, | ||
967 | [Define if ping has its own timeout option that should be set]) | ||
968 | fi | ||
969 | |||
955 | AC_ARG_WITH(ping6_command, | 970 | AC_ARG_WITH(ping6_command, |
956 | ACX_HELP_STRING([--with-ping6-command=SYNTAX], | 971 | ACX_HELP_STRING([--with-ping6-command=SYNTAX], |
957 | [sets syntax for ICMPv6 ping]), | 972 | [sets syntax for ICMPv6 ping]), |