aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Froemberg <dirk@FreeBSD.org>2001-03-30 19:08:16 +0000
committerDirk Froemberg <dirk@FreeBSD.org>2001-03-30 19:08:16 +0000
commitd08111cd895ca4c425bff5e19e3ac0bff7ada631 (patch)
treed17cf16aa8b87ebfc8b99c03170a34aa4667fb77
parent34cf5e431b5cce471ee1f24cdfc3abb826342b2e (diff)
downloadports-d08111cd895ca4c425bff5e19e3ac0bff7ada631.tar.gz
ports-d08111cd895ca4c425bff5e19e3ac0bff7ada631.zip
Notes
-rw-r--r--net-mgmt/nagios-plugins/Makefile52
-rw-r--r--net-mgmt/nagios-plugins/distinfo2
-rw-r--r--net-mgmt/nagios-plugins/files/patch-aa263
-rw-r--r--net-mgmt/nagios-plugins/files/patch-ab122
-rw-r--r--net-mgmt/nagios-plugins/pkg-plist8
-rw-r--r--net-mgmt/netsaint-plugins/Makefile52
-rw-r--r--net-mgmt/netsaint-plugins/distinfo2
-rw-r--r--net-mgmt/netsaint-plugins/files/patch-aa263
-rw-r--r--net-mgmt/netsaint-plugins/files/patch-ab122
-rw-r--r--net-mgmt/netsaint-plugins/pkg-plist8
-rw-r--r--net/nagios-plugins/Makefile52
-rw-r--r--net/nagios-plugins/distinfo2
-rw-r--r--net/nagios-plugins/files/patch-aa263
-rw-r--r--net/nagios-plugins/files/patch-ab122
-rw-r--r--net/nagios-plugins/pkg-plist8
-rw-r--r--net/netsaint-plugins/Makefile52
-rw-r--r--net/netsaint-plugins/distinfo2
-rw-r--r--net/netsaint-plugins/files/patch-aa263
-rw-r--r--net/netsaint-plugins/files/patch-ab122
-rw-r--r--net/netsaint-plugins/pkg-plist8
20 files changed, 676 insertions, 1112 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile
index 5c76e9bc8de6..e321e17cbfd2 100644
--- a/net-mgmt/nagios-plugins/Makefile
+++ b/net-mgmt/nagios-plugins/Makefile
@@ -6,30 +6,66 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.1
+PORTVERSION= 1.2.9.2
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-1
+DISTNAME= ${PORTNAME}-1.2.9-2
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= blaz@amis.net
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
+ --libexecdir=${PREFIX}/libexec/netsaint \
+ --datadir=${PREFIX}/share/netsaint \
+ --sysconfdir=${PREFIX}/etc/netsaint \
+ --localstatedir=${PREFIX}/var/netsaint
+CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
+USE_AUTOMAKE= yes
+USE_GMAKE= yes
# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint \
- automake:${PORTSDIR}/devel/automake
+BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
+
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
+PLIST_SUB+= WANT_QSTAT=""
+.else
+PLIST_SUB+= WANT_QSTAT="@comment "
.endif
+
.if defined(WANT_FPING)
BUILD_DEPENDS+= fping:${PORTSDIR}/net/fping
RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
+PLIST_SUB+= WANT_FPING=""
+.else
+PLIST_SUB+= WANT_FPING="@comment "
.endif
+
.if defined(WANT_SNMP)
-BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
-RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
+BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+PLIST_SUB+= WANT_SNMP=""
+CONFIGURE_ARGS+=--enable-snmp
+.else
+PLIST_SUB+= WANT_SNMP="@comment "
.endif
-GNU_CONFIGURE= yes
+.if defined(WANT_RADIUS)
+LIB_DEPENDS+= radiusclient.0:${PORTSDIR}/net/radiusclient
+PLIST_SUB+= WANT_RADIUS=""
+CONFIGURE_ARGS+=--enable-radius
+.else
+PLIST_SUB+= WANT_RADIUS="@comment "
+.endif
+
+.if defined(WANT_MYSQL)
+LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+PLIST_SUB+= WANT_MYSQL=""
+CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
+.else
+PLIST_SUB+= WANT_MYSQL="@comment "
+.endif
.include <bsd.port.mk>
diff --git a/net-mgmt/nagios-plugins/distinfo b/net-mgmt/nagios-plugins/distinfo
index 26936f475420..da402113a6d2 100644
--- a/net-mgmt/nagios-plugins/distinfo
+++ b/net-mgmt/nagios-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-1.tar.gz) = 656eaa2509522d303717cd561a3cf031
+MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
diff --git a/net-mgmt/nagios-plugins/files/patch-aa b/net-mgmt/nagios-plugins/files/patch-aa
deleted file mode 100644
index b2d1f9d2dc45..000000000000
--- a/net-mgmt/nagios-plugins/files/patch-aa
+++ /dev/null
@@ -1,263 +0,0 @@
---- configure.orig Wed Jan 3 10:03:39 2001
-+++ configure Thu Mar 1 22:34:57 2001
-@@ -11,7 +11,7 @@
- ac_help=
- ac_default_prefix=/usr/local
- # Any additions from configure.in:
--ac_default_prefix=/usr/local/netsaint
-+#ac_default_prefix=/usr/local/netsaint
- ac_help="$ac_help
- --with-cgiurl=<dir> sets URL for cgi programs"
- ac_help="$ac_help
-@@ -53,12 +53,12 @@
- x_includes=NONE
- x_libraries=NONE
- bindir='${exec_prefix}/bin'
--sbindir='${exec_prefix}/sbin'
--libexecdir='${exec_prefix}/libexec'
--datadir='${prefix}/share'
--sysconfdir='${prefix}/etc'
-+sbindir='${exec_prefix}/share/netsaint/sbin'
-+libexecdir='${exec_prefix}/libexec/netsaint'
-+datadir='${prefix}/share/netsaint'
-+sysconfdir='${prefix}/etc/netsaint'
- sharedstatedir='${prefix}/com'
--localstatedir='${prefix}/var'
-+localstatedir='${prefix}/var/netsaint'
- libdir='${exec_prefix}/lib'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
-@@ -1133,7 +1133,7 @@
- SET_MAKE="MAKE=${MAKE-make}"
- fi
-
--for ac_prog in gawk mawk nawk awk
-+for ac_prog in mawk gawk nawk awk
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -3718,7 +3718,7 @@
- EOF
-
- echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
--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
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3729,12 +3729,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 's user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 's user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 's uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 's uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3742,7 +3742,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3750,15 +3750,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 's comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3769,12 +3769,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'status user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'status user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'status uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'status uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3782,7 +3782,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3790,15 +3790,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'status comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3809,12 +3809,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'state uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3822,7 +3822,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3830,15 +3830,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'state comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3849,12 +3849,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -ao 'state uid ppid command args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid command args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3862,7 +3862,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -ao 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3870,15 +3870,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -ao 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
--elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
-+elif ps waxo 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3894,7 +3894,7 @@
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS waxco 'state uid ppid command command'"
-+#define PS_COMMAND "$PATH_TO_PS waxo 'state uid ppid command command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3902,7 +3902,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS waxco 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS waxo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3910,14 +3910,14 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS waxco 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS waxo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
- 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
- then
- cat >> confdefs.h <<\EOF
-@@ -3957,7 +3957,7 @@
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -waxo 'state comm vsz rss'"
- 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
- cat >> confdefs.h <<\EOF
diff --git a/net-mgmt/nagios-plugins/files/patch-ab b/net-mgmt/nagios-plugins/files/patch-ab
index c3d9f784b85f..986c84d13442 100644
--- a/net-mgmt/nagios-plugins/files/patch-ab
+++ b/net-mgmt/nagios-plugins/files/patch-ab
@@ -1,6 +1,103 @@
---- configure.in.orig Thu Mar 1 22:22:50 2001
-+++ configure.in Thu Mar 1 22:25:49 2001
-@@ -285,72 +285,72 @@
+--- configure.in.orig Tue Mar 6 06:40:44 2001
++++ configure.in Sat Mar 17 21:38:21 2001
+@@ -7,7 +7,7 @@
+ dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
+ AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
+
+-AC_PREFIX_DEFAULT(/usr/local/netsaint)
++dnl AC_PREFIX_DEFAULT(/usr/local/netsaint)
+
+ dnl Figure out how to invoke "install" and what install options to use.
+
+@@ -126,18 +126,28 @@
+ LIBS="$_SAVEDLIBS"
+ CPPFLAGS="$_SAVEDCPPFLAGS"
+
++AC_ARG_ENABLE(radius,--enable-radius compile check_radius)
++if test $enableval; then
++dnl Check for radiusclient header file
++_SAVEDCPPFLAGS="$CPPFLAGS"
++CPPFLAGS="-I${LOCALBASE}/include"
++AC_CHECK_HEADERS(radiusclient.h,RADIUSINCLUDE="-I${LOCALBASE}/include")
++AC_SUBST(RADIUSINCLUDE)
++CPPFLAGS="$_SAVEDCPPFLAGS $RADIUSINCLUDE"
++
+ dnl Check for radius libraries
+ _SAVEDLIBS="$LIBS"
+-AC_CHECK_LIB(radiusclient,rc_read_config)
++AC_CHECK_LIB(radiusclient,rc_read_config,,,-L${LOCALBASE}/lib)
+ if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
+ EXTRAS="$EXTRAS check_radius"
+- RADIUSLIBS="-lradiusclient"
++ RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient"
+ AC_SUBST(RADIUSLIBS)
+ else
+ AC_MSG_WARN([Skipping radius plugin])
+ AC_MSG_WARN([install radius libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
++fi
+
+ dnl Check for LDAP libraries
+ _SAVEDLIBS="$LIBS"
+@@ -157,9 +167,9 @@
+ dnl Check for mysql libraries
+ _SAVEDLIBS="$LIBS"
+ _SAVEDCPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="-I/usr/include"
++CPPFLAGS="-I${LOCALBASE}/include"
+ AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
+-if test -n "$MYSQLLIBS"; then
++if test -n "$MYSQLLIBDIR"; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
+ elif test -f /usr/lib/libmysqlclient.so; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
+@@ -175,7 +185,8 @@
+ AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
+ fi
+ if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
+- AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h)
++ AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h,MYSQLINCLUDE="-I${LOCALBASE}/include")
++ AC_SUBST(MYSQLINCLUDE)
+ if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
+ EXTRAS="$EXTRAS check_mysql"
+ AC_SUBST(MYSQLLIBS)
+@@ -189,7 +200,7 @@
+ AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
+-CPPFLAGS="$_SAVEDCPPFLAGS"
++CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE"
+
+ dnl Check for OpenSSL location
+ AC_PATH_PROG(OPENSSL,openssl)
+@@ -268,16 +279,16 @@
+ dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
+ dnl AC_SUBST(libsnprintf_a_SOURCES)
+
+-AC_MSG_CHECKING(for getopt_long)
+-AC_TRY_COMPILE([#include <getopt.h>
+-#include <stdlib.h>],
+-[int option_index=0;
+-static struct option *long_options;
+-getopt_long(0,NULL,"+h",long_options,&option_index);],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
++dnl AC_MSG_CHECKING(for getopt_long)
++dnl AC_TRY_COMPILE([#include <getopt.h>
++dnl #include <stdlib.h>],
++dnl [int option_index=0;
++dnl static struct option *long_options;
++dnl getopt_long(0,NULL,"+h",long_options,&option_index);],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
+
+-AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
++dnl AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
+
+ AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+
+@@ -328,72 +339,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -102,7 +199,7 @@
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]
then
-@@ -364,7 +364,7 @@
+@@ -407,7 +418,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -111,3 +208,20 @@
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]
then
+@@ -618,6 +629,8 @@
+ AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
+ fi
+
++AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
++if test $enableval; then
+ AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
+ if test -f "$PATH_TO_SNMPGET"
+ then
+@@ -625,6 +638,7 @@
+ EXTRAS="$EXTRAS check_hpjd check_snmp"
+ else
+ echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
++fi
+ fi
+
+ AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
diff --git a/net-mgmt/nagios-plugins/pkg-plist b/net-mgmt/nagios-plugins/pkg-plist
index 80cb0b267de6..27c353282403 100644
--- a/net-mgmt/nagios-plugins/pkg-plist
+++ b/net-mgmt/nagios-plugins/pkg-plist
@@ -6,9 +6,10 @@ libexec/netsaint/check_disk_smb
libexec/netsaint/check_dns
libexec/netsaint/check_dummy
libexec/netsaint/check_flexlm
-libexec/netsaint/check_fping
+%%WANT_FPING%%libexec/netsaint/check_fping
libexec/netsaint/check_ftp
-libexec/netsaint/check_game
+%%WANT_QSTAT%%libexec/netsaint/check_game
+%%WANT_SNMP%%libexec/netsaint/check_hpjd
libexec/netsaint/check_http
libexec/netsaint/check_imap
libexec/netsaint/check_ircd
@@ -16,6 +17,7 @@ libexec/netsaint/check_load
libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
+%%WANT_MYSQL%%libexec/netsaint/check_mysql
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
libexec/netsaint/check_ntp
@@ -25,10 +27,12 @@ libexec/netsaint/check_overcr
libexec/netsaint/check_ping
libexec/netsaint/check_pop
libexec/netsaint/check_procs
+%%WANT_RADIUS%%libexec/netsaint/check_radius
libexec/netsaint/check_real
libexec/netsaint/check_rpc
libexec/netsaint/check_sensors
libexec/netsaint/check_smtp
+%%WANT_SNMP%%libexec/netsaint/check_snmp
libexec/netsaint/check_ssh
libexec/netsaint/check_swap
libexec/netsaint/check_tcp
diff --git a/net-mgmt/netsaint-plugins/Makefile b/net-mgmt/netsaint-plugins/Makefile
index 5c76e9bc8de6..e321e17cbfd2 100644
--- a/net-mgmt/netsaint-plugins/Makefile
+++ b/net-mgmt/netsaint-plugins/Makefile
@@ -6,30 +6,66 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.1
+PORTVERSION= 1.2.9.2
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-1
+DISTNAME= ${PORTNAME}-1.2.9-2
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= blaz@amis.net
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
+ --libexecdir=${PREFIX}/libexec/netsaint \
+ --datadir=${PREFIX}/share/netsaint \
+ --sysconfdir=${PREFIX}/etc/netsaint \
+ --localstatedir=${PREFIX}/var/netsaint
+CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
+USE_AUTOMAKE= yes
+USE_GMAKE= yes
# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint \
- automake:${PORTSDIR}/devel/automake
+BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
+
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
+PLIST_SUB+= WANT_QSTAT=""
+.else
+PLIST_SUB+= WANT_QSTAT="@comment "
.endif
+
.if defined(WANT_FPING)
BUILD_DEPENDS+= fping:${PORTSDIR}/net/fping
RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
+PLIST_SUB+= WANT_FPING=""
+.else
+PLIST_SUB+= WANT_FPING="@comment "
.endif
+
.if defined(WANT_SNMP)
-BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
-RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
+BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+PLIST_SUB+= WANT_SNMP=""
+CONFIGURE_ARGS+=--enable-snmp
+.else
+PLIST_SUB+= WANT_SNMP="@comment "
.endif
-GNU_CONFIGURE= yes
+.if defined(WANT_RADIUS)
+LIB_DEPENDS+= radiusclient.0:${PORTSDIR}/net/radiusclient
+PLIST_SUB+= WANT_RADIUS=""
+CONFIGURE_ARGS+=--enable-radius
+.else
+PLIST_SUB+= WANT_RADIUS="@comment "
+.endif
+
+.if defined(WANT_MYSQL)
+LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+PLIST_SUB+= WANT_MYSQL=""
+CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
+.else
+PLIST_SUB+= WANT_MYSQL="@comment "
+.endif
.include <bsd.port.mk>
diff --git a/net-mgmt/netsaint-plugins/distinfo b/net-mgmt/netsaint-plugins/distinfo
index 26936f475420..da402113a6d2 100644
--- a/net-mgmt/netsaint-plugins/distinfo
+++ b/net-mgmt/netsaint-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-1.tar.gz) = 656eaa2509522d303717cd561a3cf031
+MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
diff --git a/net-mgmt/netsaint-plugins/files/patch-aa b/net-mgmt/netsaint-plugins/files/patch-aa
deleted file mode 100644
index b2d1f9d2dc45..000000000000
--- a/net-mgmt/netsaint-plugins/files/patch-aa
+++ /dev/null
@@ -1,263 +0,0 @@
---- configure.orig Wed Jan 3 10:03:39 2001
-+++ configure Thu Mar 1 22:34:57 2001
-@@ -11,7 +11,7 @@
- ac_help=
- ac_default_prefix=/usr/local
- # Any additions from configure.in:
--ac_default_prefix=/usr/local/netsaint
-+#ac_default_prefix=/usr/local/netsaint
- ac_help="$ac_help
- --with-cgiurl=<dir> sets URL for cgi programs"
- ac_help="$ac_help
-@@ -53,12 +53,12 @@
- x_includes=NONE
- x_libraries=NONE
- bindir='${exec_prefix}/bin'
--sbindir='${exec_prefix}/sbin'
--libexecdir='${exec_prefix}/libexec'
--datadir='${prefix}/share'
--sysconfdir='${prefix}/etc'
-+sbindir='${exec_prefix}/share/netsaint/sbin'
-+libexecdir='${exec_prefix}/libexec/netsaint'
-+datadir='${prefix}/share/netsaint'
-+sysconfdir='${prefix}/etc/netsaint'
- sharedstatedir='${prefix}/com'
--localstatedir='${prefix}/var'
-+localstatedir='${prefix}/var/netsaint'
- libdir='${exec_prefix}/lib'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
-@@ -1133,7 +1133,7 @@
- SET_MAKE="MAKE=${MAKE-make}"
- fi
-
--for ac_prog in gawk mawk nawk awk
-+for ac_prog in mawk gawk nawk awk
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -3718,7 +3718,7 @@
- EOF
-
- echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
--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
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3729,12 +3729,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 's user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 's user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 's uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 's uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3742,7 +3742,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3750,15 +3750,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 's comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3769,12 +3769,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'status user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'status user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'status uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'status uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3782,7 +3782,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3790,15 +3790,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'status comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3809,12 +3809,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'state uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3822,7 +3822,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3830,15 +3830,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'state comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3849,12 +3849,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -ao 'state uid ppid command args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid command args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3862,7 +3862,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -ao 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3870,15 +3870,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -ao 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
--elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
-+elif ps waxo 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3894,7 +3894,7 @@
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS waxco 'state uid ppid command command'"
-+#define PS_COMMAND "$PATH_TO_PS waxo 'state uid ppid command command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3902,7 +3902,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS waxco 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS waxo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3910,14 +3910,14 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS waxco 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS waxo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
- 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
- then
- cat >> confdefs.h <<\EOF
-@@ -3957,7 +3957,7 @@
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -waxo 'state comm vsz rss'"
- 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
- cat >> confdefs.h <<\EOF
diff --git a/net-mgmt/netsaint-plugins/files/patch-ab b/net-mgmt/netsaint-plugins/files/patch-ab
index c3d9f784b85f..986c84d13442 100644
--- a/net-mgmt/netsaint-plugins/files/patch-ab
+++ b/net-mgmt/netsaint-plugins/files/patch-ab
@@ -1,6 +1,103 @@
---- configure.in.orig Thu Mar 1 22:22:50 2001
-+++ configure.in Thu Mar 1 22:25:49 2001
-@@ -285,72 +285,72 @@
+--- configure.in.orig Tue Mar 6 06:40:44 2001
++++ configure.in Sat Mar 17 21:38:21 2001
+@@ -7,7 +7,7 @@
+ dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
+ AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
+
+-AC_PREFIX_DEFAULT(/usr/local/netsaint)
++dnl AC_PREFIX_DEFAULT(/usr/local/netsaint)
+
+ dnl Figure out how to invoke "install" and what install options to use.
+
+@@ -126,18 +126,28 @@
+ LIBS="$_SAVEDLIBS"
+ CPPFLAGS="$_SAVEDCPPFLAGS"
+
++AC_ARG_ENABLE(radius,--enable-radius compile check_radius)
++if test $enableval; then
++dnl Check for radiusclient header file
++_SAVEDCPPFLAGS="$CPPFLAGS"
++CPPFLAGS="-I${LOCALBASE}/include"
++AC_CHECK_HEADERS(radiusclient.h,RADIUSINCLUDE="-I${LOCALBASE}/include")
++AC_SUBST(RADIUSINCLUDE)
++CPPFLAGS="$_SAVEDCPPFLAGS $RADIUSINCLUDE"
++
+ dnl Check for radius libraries
+ _SAVEDLIBS="$LIBS"
+-AC_CHECK_LIB(radiusclient,rc_read_config)
++AC_CHECK_LIB(radiusclient,rc_read_config,,,-L${LOCALBASE}/lib)
+ if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
+ EXTRAS="$EXTRAS check_radius"
+- RADIUSLIBS="-lradiusclient"
++ RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient"
+ AC_SUBST(RADIUSLIBS)
+ else
+ AC_MSG_WARN([Skipping radius plugin])
+ AC_MSG_WARN([install radius libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
++fi
+
+ dnl Check for LDAP libraries
+ _SAVEDLIBS="$LIBS"
+@@ -157,9 +167,9 @@
+ dnl Check for mysql libraries
+ _SAVEDLIBS="$LIBS"
+ _SAVEDCPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="-I/usr/include"
++CPPFLAGS="-I${LOCALBASE}/include"
+ AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
+-if test -n "$MYSQLLIBS"; then
++if test -n "$MYSQLLIBDIR"; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
+ elif test -f /usr/lib/libmysqlclient.so; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
+@@ -175,7 +185,8 @@
+ AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
+ fi
+ if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
+- AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h)
++ AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h,MYSQLINCLUDE="-I${LOCALBASE}/include")
++ AC_SUBST(MYSQLINCLUDE)
+ if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
+ EXTRAS="$EXTRAS check_mysql"
+ AC_SUBST(MYSQLLIBS)
+@@ -189,7 +200,7 @@
+ AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
+-CPPFLAGS="$_SAVEDCPPFLAGS"
++CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE"
+
+ dnl Check for OpenSSL location
+ AC_PATH_PROG(OPENSSL,openssl)
+@@ -268,16 +279,16 @@
+ dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
+ dnl AC_SUBST(libsnprintf_a_SOURCES)
+
+-AC_MSG_CHECKING(for getopt_long)
+-AC_TRY_COMPILE([#include <getopt.h>
+-#include <stdlib.h>],
+-[int option_index=0;
+-static struct option *long_options;
+-getopt_long(0,NULL,"+h",long_options,&option_index);],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
++dnl AC_MSG_CHECKING(for getopt_long)
++dnl AC_TRY_COMPILE([#include <getopt.h>
++dnl #include <stdlib.h>],
++dnl [int option_index=0;
++dnl static struct option *long_options;
++dnl getopt_long(0,NULL,"+h",long_options,&option_index);],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
+
+-AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
++dnl AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
+
+ AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+
+@@ -328,72 +339,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -102,7 +199,7 @@
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]
then
-@@ -364,7 +364,7 @@
+@@ -407,7 +418,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -111,3 +208,20 @@
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]
then
+@@ -618,6 +629,8 @@
+ AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
+ fi
+
++AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
++if test $enableval; then
+ AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
+ if test -f "$PATH_TO_SNMPGET"
+ then
+@@ -625,6 +638,7 @@
+ EXTRAS="$EXTRAS check_hpjd check_snmp"
+ else
+ echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
++fi
+ fi
+
+ AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
diff --git a/net-mgmt/netsaint-plugins/pkg-plist b/net-mgmt/netsaint-plugins/pkg-plist
index 80cb0b267de6..27c353282403 100644
--- a/net-mgmt/netsaint-plugins/pkg-plist
+++ b/net-mgmt/netsaint-plugins/pkg-plist
@@ -6,9 +6,10 @@ libexec/netsaint/check_disk_smb
libexec/netsaint/check_dns
libexec/netsaint/check_dummy
libexec/netsaint/check_flexlm
-libexec/netsaint/check_fping
+%%WANT_FPING%%libexec/netsaint/check_fping
libexec/netsaint/check_ftp
-libexec/netsaint/check_game
+%%WANT_QSTAT%%libexec/netsaint/check_game
+%%WANT_SNMP%%libexec/netsaint/check_hpjd
libexec/netsaint/check_http
libexec/netsaint/check_imap
libexec/netsaint/check_ircd
@@ -16,6 +17,7 @@ libexec/netsaint/check_load
libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
+%%WANT_MYSQL%%libexec/netsaint/check_mysql
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
libexec/netsaint/check_ntp
@@ -25,10 +27,12 @@ libexec/netsaint/check_overcr
libexec/netsaint/check_ping
libexec/netsaint/check_pop
libexec/netsaint/check_procs
+%%WANT_RADIUS%%libexec/netsaint/check_radius
libexec/netsaint/check_real
libexec/netsaint/check_rpc
libexec/netsaint/check_sensors
libexec/netsaint/check_smtp
+%%WANT_SNMP%%libexec/netsaint/check_snmp
libexec/netsaint/check_ssh
libexec/netsaint/check_swap
libexec/netsaint/check_tcp
diff --git a/net/nagios-plugins/Makefile b/net/nagios-plugins/Makefile
index 5c76e9bc8de6..e321e17cbfd2 100644
--- a/net/nagios-plugins/Makefile
+++ b/net/nagios-plugins/Makefile
@@ -6,30 +6,66 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.1
+PORTVERSION= 1.2.9.2
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-1
+DISTNAME= ${PORTNAME}-1.2.9-2
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= blaz@amis.net
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
+ --libexecdir=${PREFIX}/libexec/netsaint \
+ --datadir=${PREFIX}/share/netsaint \
+ --sysconfdir=${PREFIX}/etc/netsaint \
+ --localstatedir=${PREFIX}/var/netsaint
+CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
+USE_AUTOMAKE= yes
+USE_GMAKE= yes
# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint \
- automake:${PORTSDIR}/devel/automake
+BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
+
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
+PLIST_SUB+= WANT_QSTAT=""
+.else
+PLIST_SUB+= WANT_QSTAT="@comment "
.endif
+
.if defined(WANT_FPING)
BUILD_DEPENDS+= fping:${PORTSDIR}/net/fping
RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
+PLIST_SUB+= WANT_FPING=""
+.else
+PLIST_SUB+= WANT_FPING="@comment "
.endif
+
.if defined(WANT_SNMP)
-BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
-RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
+BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+PLIST_SUB+= WANT_SNMP=""
+CONFIGURE_ARGS+=--enable-snmp
+.else
+PLIST_SUB+= WANT_SNMP="@comment "
.endif
-GNU_CONFIGURE= yes
+.if defined(WANT_RADIUS)
+LIB_DEPENDS+= radiusclient.0:${PORTSDIR}/net/radiusclient
+PLIST_SUB+= WANT_RADIUS=""
+CONFIGURE_ARGS+=--enable-radius
+.else
+PLIST_SUB+= WANT_RADIUS="@comment "
+.endif
+
+.if defined(WANT_MYSQL)
+LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+PLIST_SUB+= WANT_MYSQL=""
+CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
+.else
+PLIST_SUB+= WANT_MYSQL="@comment "
+.endif
.include <bsd.port.mk>
diff --git a/net/nagios-plugins/distinfo b/net/nagios-plugins/distinfo
index 26936f475420..da402113a6d2 100644
--- a/net/nagios-plugins/distinfo
+++ b/net/nagios-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-1.tar.gz) = 656eaa2509522d303717cd561a3cf031
+MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
diff --git a/net/nagios-plugins/files/patch-aa b/net/nagios-plugins/files/patch-aa
deleted file mode 100644
index b2d1f9d2dc45..000000000000
--- a/net/nagios-plugins/files/patch-aa
+++ /dev/null
@@ -1,263 +0,0 @@
---- configure.orig Wed Jan 3 10:03:39 2001
-+++ configure Thu Mar 1 22:34:57 2001
-@@ -11,7 +11,7 @@
- ac_help=
- ac_default_prefix=/usr/local
- # Any additions from configure.in:
--ac_default_prefix=/usr/local/netsaint
-+#ac_default_prefix=/usr/local/netsaint
- ac_help="$ac_help
- --with-cgiurl=<dir> sets URL for cgi programs"
- ac_help="$ac_help
-@@ -53,12 +53,12 @@
- x_includes=NONE
- x_libraries=NONE
- bindir='${exec_prefix}/bin'
--sbindir='${exec_prefix}/sbin'
--libexecdir='${exec_prefix}/libexec'
--datadir='${prefix}/share'
--sysconfdir='${prefix}/etc'
-+sbindir='${exec_prefix}/share/netsaint/sbin'
-+libexecdir='${exec_prefix}/libexec/netsaint'
-+datadir='${prefix}/share/netsaint'
-+sysconfdir='${prefix}/etc/netsaint'
- sharedstatedir='${prefix}/com'
--localstatedir='${prefix}/var'
-+localstatedir='${prefix}/var/netsaint'
- libdir='${exec_prefix}/lib'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
-@@ -1133,7 +1133,7 @@
- SET_MAKE="MAKE=${MAKE-make}"
- fi
-
--for ac_prog in gawk mawk nawk awk
-+for ac_prog in mawk gawk nawk awk
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -3718,7 +3718,7 @@
- EOF
-
- echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
--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
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3729,12 +3729,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 's user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 's user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 's uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 's uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3742,7 +3742,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3750,15 +3750,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 's comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3769,12 +3769,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'status user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'status user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'status uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'status uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3782,7 +3782,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3790,15 +3790,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'status comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3809,12 +3809,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'state uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3822,7 +3822,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3830,15 +3830,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'state comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3849,12 +3849,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -ao 'state uid ppid command args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid command args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3862,7 +3862,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -ao 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3870,15 +3870,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -ao 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
--elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
-+elif ps waxo 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3894,7 +3894,7 @@
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS waxco 'state uid ppid command command'"
-+#define PS_COMMAND "$PATH_TO_PS waxo 'state uid ppid command command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3902,7 +3902,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS waxco 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS waxo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3910,14 +3910,14 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS waxco 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS waxo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
- 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
- then
- cat >> confdefs.h <<\EOF
-@@ -3957,7 +3957,7 @@
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -waxo 'state comm vsz rss'"
- 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
- cat >> confdefs.h <<\EOF
diff --git a/net/nagios-plugins/files/patch-ab b/net/nagios-plugins/files/patch-ab
index c3d9f784b85f..986c84d13442 100644
--- a/net/nagios-plugins/files/patch-ab
+++ b/net/nagios-plugins/files/patch-ab
@@ -1,6 +1,103 @@
---- configure.in.orig Thu Mar 1 22:22:50 2001
-+++ configure.in Thu Mar 1 22:25:49 2001
-@@ -285,72 +285,72 @@
+--- configure.in.orig Tue Mar 6 06:40:44 2001
++++ configure.in Sat Mar 17 21:38:21 2001
+@@ -7,7 +7,7 @@
+ dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
+ AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
+
+-AC_PREFIX_DEFAULT(/usr/local/netsaint)
++dnl AC_PREFIX_DEFAULT(/usr/local/netsaint)
+
+ dnl Figure out how to invoke "install" and what install options to use.
+
+@@ -126,18 +126,28 @@
+ LIBS="$_SAVEDLIBS"
+ CPPFLAGS="$_SAVEDCPPFLAGS"
+
++AC_ARG_ENABLE(radius,--enable-radius compile check_radius)
++if test $enableval; then
++dnl Check for radiusclient header file
++_SAVEDCPPFLAGS="$CPPFLAGS"
++CPPFLAGS="-I${LOCALBASE}/include"
++AC_CHECK_HEADERS(radiusclient.h,RADIUSINCLUDE="-I${LOCALBASE}/include")
++AC_SUBST(RADIUSINCLUDE)
++CPPFLAGS="$_SAVEDCPPFLAGS $RADIUSINCLUDE"
++
+ dnl Check for radius libraries
+ _SAVEDLIBS="$LIBS"
+-AC_CHECK_LIB(radiusclient,rc_read_config)
++AC_CHECK_LIB(radiusclient,rc_read_config,,,-L${LOCALBASE}/lib)
+ if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
+ EXTRAS="$EXTRAS check_radius"
+- RADIUSLIBS="-lradiusclient"
++ RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient"
+ AC_SUBST(RADIUSLIBS)
+ else
+ AC_MSG_WARN([Skipping radius plugin])
+ AC_MSG_WARN([install radius libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
++fi
+
+ dnl Check for LDAP libraries
+ _SAVEDLIBS="$LIBS"
+@@ -157,9 +167,9 @@
+ dnl Check for mysql libraries
+ _SAVEDLIBS="$LIBS"
+ _SAVEDCPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="-I/usr/include"
++CPPFLAGS="-I${LOCALBASE}/include"
+ AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
+-if test -n "$MYSQLLIBS"; then
++if test -n "$MYSQLLIBDIR"; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
+ elif test -f /usr/lib/libmysqlclient.so; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
+@@ -175,7 +185,8 @@
+ AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
+ fi
+ if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
+- AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h)
++ AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h,MYSQLINCLUDE="-I${LOCALBASE}/include")
++ AC_SUBST(MYSQLINCLUDE)
+ if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
+ EXTRAS="$EXTRAS check_mysql"
+ AC_SUBST(MYSQLLIBS)
+@@ -189,7 +200,7 @@
+ AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
+-CPPFLAGS="$_SAVEDCPPFLAGS"
++CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE"
+
+ dnl Check for OpenSSL location
+ AC_PATH_PROG(OPENSSL,openssl)
+@@ -268,16 +279,16 @@
+ dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
+ dnl AC_SUBST(libsnprintf_a_SOURCES)
+
+-AC_MSG_CHECKING(for getopt_long)
+-AC_TRY_COMPILE([#include <getopt.h>
+-#include <stdlib.h>],
+-[int option_index=0;
+-static struct option *long_options;
+-getopt_long(0,NULL,"+h",long_options,&option_index);],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
++dnl AC_MSG_CHECKING(for getopt_long)
++dnl AC_TRY_COMPILE([#include <getopt.h>
++dnl #include <stdlib.h>],
++dnl [int option_index=0;
++dnl static struct option *long_options;
++dnl getopt_long(0,NULL,"+h",long_options,&option_index);],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
+
+-AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
++dnl AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
+
+ AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+
+@@ -328,72 +339,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -102,7 +199,7 @@
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]
then
-@@ -364,7 +364,7 @@
+@@ -407,7 +418,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -111,3 +208,20 @@
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]
then
+@@ -618,6 +629,8 @@
+ AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
+ fi
+
++AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
++if test $enableval; then
+ AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
+ if test -f "$PATH_TO_SNMPGET"
+ then
+@@ -625,6 +638,7 @@
+ EXTRAS="$EXTRAS check_hpjd check_snmp"
+ else
+ echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
++fi
+ fi
+
+ AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
diff --git a/net/nagios-plugins/pkg-plist b/net/nagios-plugins/pkg-plist
index 80cb0b267de6..27c353282403 100644
--- a/net/nagios-plugins/pkg-plist
+++ b/net/nagios-plugins/pkg-plist
@@ -6,9 +6,10 @@ libexec/netsaint/check_disk_smb
libexec/netsaint/check_dns
libexec/netsaint/check_dummy
libexec/netsaint/check_flexlm
-libexec/netsaint/check_fping
+%%WANT_FPING%%libexec/netsaint/check_fping
libexec/netsaint/check_ftp
-libexec/netsaint/check_game
+%%WANT_QSTAT%%libexec/netsaint/check_game
+%%WANT_SNMP%%libexec/netsaint/check_hpjd
libexec/netsaint/check_http
libexec/netsaint/check_imap
libexec/netsaint/check_ircd
@@ -16,6 +17,7 @@ libexec/netsaint/check_load
libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
+%%WANT_MYSQL%%libexec/netsaint/check_mysql
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
libexec/netsaint/check_ntp
@@ -25,10 +27,12 @@ libexec/netsaint/check_overcr
libexec/netsaint/check_ping
libexec/netsaint/check_pop
libexec/netsaint/check_procs
+%%WANT_RADIUS%%libexec/netsaint/check_radius
libexec/netsaint/check_real
libexec/netsaint/check_rpc
libexec/netsaint/check_sensors
libexec/netsaint/check_smtp
+%%WANT_SNMP%%libexec/netsaint/check_snmp
libexec/netsaint/check_ssh
libexec/netsaint/check_swap
libexec/netsaint/check_tcp
diff --git a/net/netsaint-plugins/Makefile b/net/netsaint-plugins/Makefile
index 5c76e9bc8de6..e321e17cbfd2 100644
--- a/net/netsaint-plugins/Makefile
+++ b/net/netsaint-plugins/Makefile
@@ -6,30 +6,66 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.1
+PORTVERSION= 1.2.9.2
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-1
+DISTNAME= ${PORTNAME}-1.2.9-2
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= blaz@amis.net
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
+ --libexecdir=${PREFIX}/libexec/netsaint \
+ --datadir=${PREFIX}/share/netsaint \
+ --sysconfdir=${PREFIX}/etc/netsaint \
+ --localstatedir=${PREFIX}/var/netsaint
+CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
+USE_AUTOMAKE= yes
+USE_GMAKE= yes
# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint \
- automake:${PORTSDIR}/devel/automake
+BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
+
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
+PLIST_SUB+= WANT_QSTAT=""
+.else
+PLIST_SUB+= WANT_QSTAT="@comment "
.endif
+
.if defined(WANT_FPING)
BUILD_DEPENDS+= fping:${PORTSDIR}/net/fping
RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
+PLIST_SUB+= WANT_FPING=""
+.else
+PLIST_SUB+= WANT_FPING="@comment "
.endif
+
.if defined(WANT_SNMP)
-BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
-RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/ucd-snmp
+BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net/net-snmp
+PLIST_SUB+= WANT_SNMP=""
+CONFIGURE_ARGS+=--enable-snmp
+.else
+PLIST_SUB+= WANT_SNMP="@comment "
.endif
-GNU_CONFIGURE= yes
+.if defined(WANT_RADIUS)
+LIB_DEPENDS+= radiusclient.0:${PORTSDIR}/net/radiusclient
+PLIST_SUB+= WANT_RADIUS=""
+CONFIGURE_ARGS+=--enable-radius
+.else
+PLIST_SUB+= WANT_RADIUS="@comment "
+.endif
+
+.if defined(WANT_MYSQL)
+LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+PLIST_SUB+= WANT_MYSQL=""
+CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
+.else
+PLIST_SUB+= WANT_MYSQL="@comment "
+.endif
.include <bsd.port.mk>
diff --git a/net/netsaint-plugins/distinfo b/net/netsaint-plugins/distinfo
index 26936f475420..da402113a6d2 100644
--- a/net/netsaint-plugins/distinfo
+++ b/net/netsaint-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-1.tar.gz) = 656eaa2509522d303717cd561a3cf031
+MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
diff --git a/net/netsaint-plugins/files/patch-aa b/net/netsaint-plugins/files/patch-aa
deleted file mode 100644
index b2d1f9d2dc45..000000000000
--- a/net/netsaint-plugins/files/patch-aa
+++ /dev/null
@@ -1,263 +0,0 @@
---- configure.orig Wed Jan 3 10:03:39 2001
-+++ configure Thu Mar 1 22:34:57 2001
-@@ -11,7 +11,7 @@
- ac_help=
- ac_default_prefix=/usr/local
- # Any additions from configure.in:
--ac_default_prefix=/usr/local/netsaint
-+#ac_default_prefix=/usr/local/netsaint
- ac_help="$ac_help
- --with-cgiurl=<dir> sets URL for cgi programs"
- ac_help="$ac_help
-@@ -53,12 +53,12 @@
- x_includes=NONE
- x_libraries=NONE
- bindir='${exec_prefix}/bin'
--sbindir='${exec_prefix}/sbin'
--libexecdir='${exec_prefix}/libexec'
--datadir='${prefix}/share'
--sysconfdir='${prefix}/etc'
-+sbindir='${exec_prefix}/share/netsaint/sbin'
-+libexecdir='${exec_prefix}/libexec/netsaint'
-+datadir='${prefix}/share/netsaint'
-+sysconfdir='${prefix}/etc/netsaint'
- sharedstatedir='${prefix}/com'
--localstatedir='${prefix}/var'
-+localstatedir='${prefix}/var/netsaint'
- libdir='${exec_prefix}/lib'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
-@@ -1133,7 +1133,7 @@
- SET_MAKE="MAKE=${MAKE-make}"
- fi
-
--for ac_prog in gawk mawk nawk awk
-+for ac_prog in mawk gawk nawk awk
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
-@@ -3718,7 +3718,7 @@
- EOF
-
- echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
--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
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3729,12 +3729,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 's user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 's user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 's uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 's uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3742,7 +3742,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3750,15 +3750,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 's comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3769,12 +3769,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'status user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'status user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'status uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'status uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3782,7 +3782,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3790,15 +3790,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'status comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3809,12 +3809,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -Ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -Ao 'state uid ppid comm args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid comm args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3822,7 +3822,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -Ao 'vsz comm'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz comm'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3830,15 +3830,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -Ao 'rss comm'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss comm'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'"
--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
-+ echo " ps syntax... $PATH_TO_PS -axo 'state comm vsz rss'"
-+elif ps -axo '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
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3849,12 +3849,12 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define PS_RAW_COMMAND "$PATH_TO_PS -ao 'state user ppid args'"
-+#define PS_RAW_COMMAND "$PATH_TO_PS -axo 'state user ppid args'"
- EOF
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS -ao 'state uid ppid command args'"
-+#define PS_COMMAND "$PATH_TO_PS -axo 'state uid ppid command args'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3862,7 +3862,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS -ao 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS -axo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3870,15 +3870,15 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS -ao 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS -axo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
--elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
-+elif ps waxo 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null
- then
- cat >> confdefs.h <<\EOF
- #define USE_PS_VARS 1
-@@ -3894,7 +3894,7 @@
-
- EXTRAS="$EXTRAS check_netsaint"
- cat >> confdefs.h <<EOF
--#define PS_COMMAND "$PATH_TO_PS waxco 'state uid ppid command command'"
-+#define PS_COMMAND "$PATH_TO_PS waxo 'state uid ppid command command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3902,7 +3902,7 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define VSZ_COMMAND "$PATH_TO_PS waxco 'vsz command'"
-+#define VSZ_COMMAND "$PATH_TO_PS waxo 'vsz command'"
- EOF
-
- cat >> confdefs.h <<EOF
-@@ -3910,14 +3910,14 @@
- EOF
-
- cat >> confdefs.h <<EOF
--#define RSS_COMMAND "$PATH_TO_PS waxco 'rss command'"
-+#define RSS_COMMAND "$PATH_TO_PS waxo 'rss command'"
- EOF
-
- cat >> confdefs.h <<EOF
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -axo 'state command vsz rss'"
- 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
- then
- cat >> confdefs.h <<\EOF
-@@ -3957,7 +3957,7 @@
- #define RSS_FORMAT "%d %s"
- EOF
-
-- echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
-+ echo " ps syntax... $PATH_TO_PS -waxo 'state comm vsz rss'"
- 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
- cat >> confdefs.h <<\EOF
diff --git a/net/netsaint-plugins/files/patch-ab b/net/netsaint-plugins/files/patch-ab
index c3d9f784b85f..986c84d13442 100644
--- a/net/netsaint-plugins/files/patch-ab
+++ b/net/netsaint-plugins/files/patch-ab
@@ -1,6 +1,103 @@
---- configure.in.orig Thu Mar 1 22:22:50 2001
-+++ configure.in Thu Mar 1 22:25:49 2001
-@@ -285,72 +285,72 @@
+--- configure.in.orig Tue Mar 6 06:40:44 2001
++++ configure.in Sat Mar 17 21:38:21 2001
+@@ -7,7 +7,7 @@
+ dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
+ AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
+
+-AC_PREFIX_DEFAULT(/usr/local/netsaint)
++dnl AC_PREFIX_DEFAULT(/usr/local/netsaint)
+
+ dnl Figure out how to invoke "install" and what install options to use.
+
+@@ -126,18 +126,28 @@
+ LIBS="$_SAVEDLIBS"
+ CPPFLAGS="$_SAVEDCPPFLAGS"
+
++AC_ARG_ENABLE(radius,--enable-radius compile check_radius)
++if test $enableval; then
++dnl Check for radiusclient header file
++_SAVEDCPPFLAGS="$CPPFLAGS"
++CPPFLAGS="-I${LOCALBASE}/include"
++AC_CHECK_HEADERS(radiusclient.h,RADIUSINCLUDE="-I${LOCALBASE}/include")
++AC_SUBST(RADIUSINCLUDE)
++CPPFLAGS="$_SAVEDCPPFLAGS $RADIUSINCLUDE"
++
+ dnl Check for radius libraries
+ _SAVEDLIBS="$LIBS"
+-AC_CHECK_LIB(radiusclient,rc_read_config)
++AC_CHECK_LIB(radiusclient,rc_read_config,,,-L${LOCALBASE}/lib)
+ if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
+ EXTRAS="$EXTRAS check_radius"
+- RADIUSLIBS="-lradiusclient"
++ RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient"
+ AC_SUBST(RADIUSLIBS)
+ else
+ AC_MSG_WARN([Skipping radius plugin])
+ AC_MSG_WARN([install radius libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
++fi
+
+ dnl Check for LDAP libraries
+ _SAVEDLIBS="$LIBS"
+@@ -157,9 +167,9 @@
+ dnl Check for mysql libraries
+ _SAVEDLIBS="$LIBS"
+ _SAVEDCPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="-I/usr/include"
++CPPFLAGS="-I${LOCALBASE}/include"
+ AC_ARG_WITH(mysqllibdir,--with-mysqllibdir=<dir> sets path to mysql libraries,[MYSQLLIBDIR=$withval])
+-if test -n "$MYSQLLIBS"; then
++if test -n "$MYSQLLIBDIR"; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
+ elif test -f /usr/lib/libmysqlclient.so; then
+ AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
+@@ -175,7 +185,8 @@
+ AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
+ fi
+ if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
+- AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h)
++ AC_CHECK_HEADERS(mysql/mysql.h mysql/errmsg.h,MYSQLINCLUDE="-I${LOCALBASE}/include")
++ AC_SUBST(MYSQLINCLUDE)
+ if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
+ EXTRAS="$EXTRAS check_mysql"
+ AC_SUBST(MYSQLLIBS)
+@@ -189,7 +200,7 @@
+ AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
+ fi
+ LIBS="$_SAVEDLIBS"
+-CPPFLAGS="$_SAVEDCPPFLAGS"
++CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE"
+
+ dnl Check for OpenSSL location
+ AC_PATH_PROG(OPENSSL,openssl)
+@@ -268,16 +279,16 @@
+ dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
+ dnl AC_SUBST(libsnprintf_a_SOURCES)
+
+-AC_MSG_CHECKING(for getopt_long)
+-AC_TRY_COMPILE([#include <getopt.h>
+-#include <stdlib.h>],
+-[int option_index=0;
+-static struct option *long_options;
+-getopt_long(0,NULL,"+h",long_options,&option_index);],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
+-[AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
++dnl AC_MSG_CHECKING(for getopt_long)
++dnl AC_TRY_COMPILE([#include <getopt.h>
++dnl #include <stdlib.h>],
++dnl [int option_index=0;
++dnl static struct option *long_options;
++dnl getopt_long(0,NULL,"+h",long_options,&option_index);],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
++dnl [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
+
+-AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
++dnl AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
+
+ AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
+
+@@ -328,72 +339,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -102,7 +199,7 @@
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]
then
-@@ -364,7 +364,7 @@
+@@ -407,7 +418,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -111,3 +208,20 @@
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]
then
+@@ -618,6 +629,8 @@
+ AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
+ fi
+
++AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp)
++if test $enableval; then
+ AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
+ if test -f "$PATH_TO_SNMPGET"
+ then
+@@ -625,6 +638,7 @@
+ EXTRAS="$EXTRAS check_hpjd check_snmp"
+ else
+ echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
++fi
+ fi
+
+ AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
diff --git a/net/netsaint-plugins/pkg-plist b/net/netsaint-plugins/pkg-plist
index 80cb0b267de6..27c353282403 100644
--- a/net/netsaint-plugins/pkg-plist
+++ b/net/netsaint-plugins/pkg-plist
@@ -6,9 +6,10 @@ libexec/netsaint/check_disk_smb
libexec/netsaint/check_dns
libexec/netsaint/check_dummy
libexec/netsaint/check_flexlm
-libexec/netsaint/check_fping
+%%WANT_FPING%%libexec/netsaint/check_fping
libexec/netsaint/check_ftp
-libexec/netsaint/check_game
+%%WANT_QSTAT%%libexec/netsaint/check_game
+%%WANT_SNMP%%libexec/netsaint/check_hpjd
libexec/netsaint/check_http
libexec/netsaint/check_imap
libexec/netsaint/check_ircd
@@ -16,6 +17,7 @@ libexec/netsaint/check_load
libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
+%%WANT_MYSQL%%libexec/netsaint/check_mysql
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
libexec/netsaint/check_ntp
@@ -25,10 +27,12 @@ libexec/netsaint/check_overcr
libexec/netsaint/check_ping
libexec/netsaint/check_pop
libexec/netsaint/check_procs
+%%WANT_RADIUS%%libexec/netsaint/check_radius
libexec/netsaint/check_real
libexec/netsaint/check_rpc
libexec/netsaint/check_sensors
libexec/netsaint/check_smtp
+%%WANT_SNMP%%libexec/netsaint/check_snmp
libexec/netsaint/check_ssh
libexec/netsaint/check_swap
libexec/netsaint/check_tcp