Logged In: NO

Here is a more complete version of the patch needed to run
check_ping under RH7.3

diff -uNr netsaint-plugins-1.2.9-4.orig/configure netsaint-
plugins-1.2.9-4/configure
--- netsaint-plugins-1.2.9-4.orig/configure Thu Apr 26
13:46:17 2001
+++ netsaint-plugins-1.2.9-4/configure Fri Jun 21 20:42:13
2002
@@ -4772,6 +4772,20 @@
EOF

fi
+elif ping -U -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^rtt"
>/dev/null
+then
+ PING_COMMAND="$PATH_TO_PING -U -n -c %d %s"
+ cat >> confdefs.h <<EOF
+#define PING_PACKETS_FIRST "$PING_COMMAND"
+EOF
+
+elif ping -U -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-
trip" >/dev/null
+then
+ PING_COMMAND="$PATH_TO_PING -U -n -c %d %s"
+ cat >> confdefs.h <<EOF
+#define PING_PACKETS_FIRST "$PING_COMMAND"
+EOF
+
elif ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip"
>/dev/null
then
PING_COMMAND="$PATH_TO_PING -n -c %d %s"
diff -uNr netsaint-plugins-1.2.9-4.orig/configure.in netsaint-
plugins-1.2.9-4/configure.in
--- netsaint-plugins-1.2.9-4.orig/configure.in Thu Apr 26
09:00:26 2001
+++ netsaint-plugins-1.2.9-4/configure.in Fri Jun 21
20:42:38 2002
@@ -556,6 +556,16 @@
then
AC_DEFINE_UNQUOTED
(PING_PACKETS_FIRST,"$PING_COMMAND")
fi
+elif [ping -U -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^rtt"
>/dev/null]
+then
+ PING_COMMAND="$PATH_TO_PING -U -n -c %d %s"
+ AC_DEFINE_UNQUOTED
(PING_PACKETS_FIRST,"$PING_COMMAND")
+ echo " ping syntax... $PATH_TO_PING -U -n -c
<count> <host>"
+elif [ping -U -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-
trip" >/dev/null]
+then
+ PING_COMMAND="$PATH_TO_PING -U -n -c %d %s"
+ AC_DEFINE_UNQUOTED
(PING_PACKETS_FIRST,"$PING_COMMAND")
+ echo " ping syntax... $PATH_TO_PING -U -n -c
<count> <host>"
elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip"
>/dev/null]
then
PING_COMMAND="$PATH_TO_PING -n -c %d %s"
diff -uNr netsaint-plugins-1.2.9-4.orig/plugins/check_ping.c
netsaint-plugins-1.2.9-4/plugins/check_ping.c
--- netsaint-plugins-1.2.9-4.orig/plugins/check_ping.c Fri Apr
13 15:19:47 2001
+++ netsaint-plugins-1.2.9-4/plugins/check_ping.c Fri Jun
21 20:34:26 2002
@@ -399,7 +399,8 @@

/* get the percent loss statistics */
if (sscanf (input_buffer, "%*d packets
transmitted, %*d packets received, +%*d errors, %d%%
packet loss", &p
l) == 1 ||
- sscanf (input_buffer, "%*d
packets transmitted, %*d packets received, %d%% packet
loss", &pl
) == 1)
+ sscanf (input_buffer, "%*d
packets transmitted, %*d packets received, %d%% packet
loss", &pl
) == 1 ||
+ sscanf (input_buffer, "%*d
packets transmitted, %*d received, %d%% loss", &pl) == 1)
continue;

/* get the round trip average */
@@ -409,7 +410,8 @@
sscanf (input_buffer, "round-
trip min/avg/max/sdev = %*f/%f/%*f/%*f", &rta) == 1 ||
sscanf (input_buffer, "round-
trip min/avg/max/stddev = %*f/%f/%*f/%*f", &rta) == 1 |
|
sscanf (input_buffer, "round-
trip min/avg/max/std-dev = %*f/%f/%*f/%*f", &rta) == 1
||
- sscanf (input_buffer, "round-
trip (ms) min/avg/max = %*f/%f/%*f", &rta) == 1)
+ sscanf (input_buffer, "round-
trip (ms) min/avg/max = %*f/%f/%*f", &rta) == 1 ||
+ sscanf (input_buffer, "rtt
min/avg/max/mdev = %*f/%f/%*f/%*f", &rta) == 1)
continue;
}