summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 261b267)
raw | patch | inline | side by side (parent: 261b267)
author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | |
Tue, 11 Mar 2003 18:32:08 +0000 (18:32 +0000) | ||
committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | |
Tue, 11 Mar 2003 18:32:08 +0000 (18:32 +0000) |
Inclusion of ICMPv6 ping tests to define PING6_COMMAND
Minor fix to ps syntax checking to fix bug I introduced last nite
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@394 f882894a-f735-0410-b71e-b25c423dba1c
Minor fix to ps syntax checking to fix bug I introduced last nite
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@394 f882894a-f735-0410-b71e-b25c423dba1c
configure.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index 1cad0d954a98b6094ecf23aea9b954c5d8b66ee6..179fd259ceb583ba277cf74580efaa646b9fae1c 100644 (file)
--- a/configure.in
+++ b/configure.in
#include <sys/types.h>
#include <sys/vfs.h>],
[struct statfs t; long c = *(t.f_spare);],
-fu_cv_sys_truncating_statfs=yes,
-fu_cv_sys_truncating_statfs=no,
+fu_cv_sys_truncating_statfs=yes
+AC_MSG_RESULT(yes),
+fu_cv_sys_truncating_statfs=no
+AC_MSG_RESULT(no),
)])
if test $fu_cv_sys_truncating_statfs = yes; then
AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1,
AC_MSG_CHECKING(for ps syntax)
dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
- egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ \
- +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
dnl BSD-like mode in RH 6.1
elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \
- egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] \
- >/dev/null
+ egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
dnl SunOS 4.1.3:
dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
-elif ps -laxnwww 2>/dev/null | egrep -i ["^ *F(LAGS)? +UID +PID +PPID \
- +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME \
- +COMMAND"] >/dev/null
+elif ps -laxnwww 2>/dev/null | \
+ egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_raw_command="$PATH_TO_PS laxnwww"
dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
dnl
-elif ps laxnwww 2>/dev/null | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI \
- +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
+elif ps laxnwww 2>/dev/null | \
+ egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_raw_command="$PATH_TO_PS laxnwww"
dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
- egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ \
- +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT
elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \
- egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ \
- +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
AC_MSG_RESULT([$ac_cv_ps_command])
elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \
- egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ \
- +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
AC_MSG_RESULT([$ac_cv_ps_command])
elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \
- egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \
- +PPID +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
AC_MSG_RESULT([$ac_cv_ps_command])
elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \
- egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \
- +PPID +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
AC_MSG_RESULT([$ac_cv_ps_command])
elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \
- egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \
- +PPID +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
dnl wonder who takes state instead of stat
elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \
- egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER \
- +PPID +[RGSCOMDNA]+"] >/dev/null
+ egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]"
AC_MSG_RESULT([$ac_cv_ps_command])
dnl IRIX 53
-elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \
- +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
+elif ps -el 2>/dev/null | \
+ egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
AC_MSG_RESULT([$ac_cv_ps_command])
dnl IRIX 63
-elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \
- +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
+elif ps -el 2>/dev/null | \
+ egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
dnl AIX 4.1:
dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD
dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper
-elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI \
- +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
+elif ps -el 2>/dev/null | \
+ egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
AC_MSG_RESULT([$ac_cv_ps_command])
dnl AIX?
-elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI \
- +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
+elif ps glaxen 2>/dev/null | \
+ egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]"
AC_MSG_RESULT([$ac_cv_ps_command])
dnl UnixWare
-elif ps -Al 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI \
- +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
+elif ps -Al 2>/dev/null | \
+ egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
then
ac_cv_use_ps_vars=yes
ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]"
[sets syntax for ICMP ping]),
ac_cv_ping_command=$withval,)
-AC_MSG_CHECKING(for ping syntax)
+AC_MSG_CHECKING(for ICMP ping syntax)
+ac_cv_ping_packets_first=no
if test -n "$ac_cv_ping_command"
then
AC_MSG_RESULT([(command-line) $ac_cv_ping_command])
- if test -n "$PING_PACKETS_FIRST"
+ if test -n "$ac_cv_ping_packets_first"
then
ac_cv_ping_packets_first=yes
dnl AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$ac_cv_ping_command",
AC_DEFINE_UNQUOTED(PING_COMMAND,"$ac_cv_ping_command",
[path and args for ICMP ping command])
-if test x$ac_cv_ping_packets_first != xno
+if test "x$ac_cv_ping_packets_first" != "xno"
then
AC_DEFINE(PING_PACKETS_FIRST,1,
[Define if packet count must precede host])
AC_ARG_WITH(ping6_command,
ACX_HELP_STRING([--with-ping6-command=SYNTAX],
[sets syntax for ICMPv6 ping]),
- PING6_COMMAND=$withval,)
+ ac_cv_ping6_command=$withval,)
+
+AC_MSG_CHECKING(for ICMPv6 ping syntax)
+ac_cv_ping6_packets_first=no
+if test -n "$ac_cv_ping6_command"
+then
+ AC_MSG_RESULT([(command-line) $ac_cv_ping6_command])
+ if test -n "$ac_cv_ping6_packets_first"
+ then
+ ac_cv_ping6_packets_first=yes
+ fi
+
+elif test "x$PATH_TO_PING6" != "x"; then
+ if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
+ $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 -n -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 -n %s -c %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 %s -n %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping_command="$PATH_TO_PING6 -n -s 56 -c %d %s"
+ ac_cv_ping_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping_command])
+
+ elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING6 -n -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ fi
+
+elif test "x$PATH_TO_PING" != "x"; then
+ if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
+ $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 %s -n %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d"
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s"
+ ac_cv_ping_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping_command])
+
+ elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
+ egrep -i "^round-trip|^rtt" >/dev/null
+ then
+ ac_cv_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
+ ac_cv_ping6_packets_first=yes
+ AC_MSG_RESULT([$ac_cv_ping6_command])
+
+ fi
+
+fi
+
+if test "x$ac_cv_ping6_command" != "x"; then
+ AC_DEFINE_UNQUOTED(PING6_COMMAND,"$ac_cv_ping6_command",
+ [path and args for ICMPv6 ping command])
+else
+ AC_MSG_RESULT([none])
+fi
+
+if test "x$ac_cv_ping6_packets_first" != "xno"; then
+ AC_DEFINE(PING6_PACKETS_FIRST,1,
+ [Define if packet count must precede host])
+fi
AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup)