diff options
Diffstat (limited to 'web/attachments/353970-0001-Detect-arguments-passed-via-with-ping-6-command-2908.patch')
-rw-r--r-- | web/attachments/353970-0001-Detect-arguments-passed-via-with-ping-6-command-2908.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/web/attachments/353970-0001-Detect-arguments-passed-via-with-ping-6-command-2908.patch b/web/attachments/353970-0001-Detect-arguments-passed-via-with-ping-6-command-2908.patch new file mode 100644 index 0000000..60bda5c --- /dev/null +++ b/web/attachments/353970-0001-Detect-arguments-passed-via-with-ping-6-command-2908.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 96a23a4c117a9c2665ca09e5964eacf028dbcdcf Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Guyot-Sionnest <dermoth@aei.ca> | ||
3 | Date: Fri, 4 Dec 2009 15:24:15 -0500 | ||
4 | Subject: [PATCH] Detect arguments passed via --with-ping[6]-command (#2908236) | ||
5 | |||
6 | --- | ||
7 | NEWS | 1 + | ||
8 | configure.in | 19 +++++++++++++++++-- | ||
9 | 2 files changed, 18 insertions(+), 2 deletions(-) | ||
10 | |||
11 | diff --git a/NEWS b/NEWS | ||
12 | index f5be201..667e1f0 100644 | ||
13 | --- a/NEWS | ||
14 | +++ b/NEWS | ||
15 | @@ -7,6 +7,7 @@ This file documents the major additions and syntax changes between releases. | ||
16 | Add proxy-authorization option to check_http (Marcel Kuiper - #1323230, Bryan Irvine - #2863925) | ||
17 | check_icmp now increment the sequence counter in each packet | ||
18 | Fix usage of repeated -o options in check_snmp | ||
19 | + Try to detect arguments passed via --with-ping[6]-command and set options accordingly (#2908236) | ||
20 | WARNINGS | ||
21 | Updated developer documentation to say that performance labels should not have an equals sign or | ||
22 | single quote in the label | ||
23 | diff --git a/configure.in b/configure.in | ||
24 | index f354734..d02d7f8 100644 | ||
25 | --- a/configure.in | ||
26 | +++ b/configure.in | ||
27 | @@ -877,10 +877,17 @@ ac_cv_ping_has_timeout=no | ||
28 | if test -n "$with_ping_command" | ||
29 | then | ||
30 | AC_MSG_RESULT([(command-line) $with_ping_command]) | ||
31 | - if test -n "$ac_cv_ping_packets_first" | ||
32 | + if echo "$with_ping_command" | grep '%d.*%d.*%s' >/dev/null | ||
33 | then | ||
34 | ac_cv_ping_packets_first=yes | ||
35 | ac_cv_ping_has_timeout=yes | ||
36 | + elif echo "$with_ping_command" | grep '%d.*%s.*%d' >/dev/null || \ | ||
37 | + echo "$with_ping_command" | grep '%s.*%d.*%d' >/dev/null | ||
38 | + then | ||
39 | + ac_cv_ping_has_timeout=yes | ||
40 | + elif echo "$with_ping_command" | grep '%d.*%s' >/dev/null | ||
41 | + then | ||
42 | + ac_cv_ping_packets_first=yes | ||
43 | fi | ||
44 | |||
45 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | ||
46 | @@ -981,7 +988,15 @@ ac_cv_ping6_packets_first=no | ||
47 | if test -n "$with_ping6_command" | ||
48 | then | ||
49 | AC_MSG_RESULT([(command-line) $with_ping6_command]) | ||
50 | - if test -n "$ac_cv_ping6_packets_first" | ||
51 | + if echo "$with_ping6_command" | grep '%d.*%d.*%s' >/dev/null | ||
52 | + then | ||
53 | + ac_cv_ping6_packets_first=yes | ||
54 | + elif echo "$with_ping6_command" | grep '%d.*%s.*%d' >/dev/null || \ | ||
55 | + echo "$with_ping6_command" | grep '%s.*%d.*%d' >/dev/null | ||
56 | + then | ||
57 | + # Just keep same logic as ping (IPv4) if we ever need ac_cv_ping6_has_timeout | ||
58 | + true | ||
59 | + elif echo "$with_ping6_command" | grep '%d.*%s' >/dev/null | ||
60 | then | ||
61 | ac_cv_ping6_packets_first=yes | ||
62 | fi | ||
63 | -- | ||
64 | 1.6.5.1 | ||
65 | |||