Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
This is a package for a pgsql monitoring plug-in for nagios. For
more information about nagios, see the 'nagios-base' package.

View File

@@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.15 2013/02/06 23:23:19 jperkin Exp $
#
PKGNAME= nagios-plugin-pgsql-${PLUGINSVERSION}
PKGREVISION= 3
CATEGORIES= net sysutils databases
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Nagios pgsql plugin
LICENSE= gnu-gpl-v3
DEPENDS+= nagios-plugins-${PLUGINSVERSION}{,nb[0-9]*}:../../net/nagios-plugins
CONFIGURE_ARGS+= --with-pgsql=${BUILDLINK_PREFIX.pgsql-lib}
#CPPFLAGS+= -I${PGSQL_PREFIX}/include/pgsql
.include "../../net/nagios-plugins/Makefile.common"
BINARY_TARGET= check_pgsql
.include "../../net/nagios-plugins/Makefile.plugin"
.include "../../mk/pgsql.buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2006/02/18 17:22:57 bouyer Exp $
libexec/nagios/check_pgsql

View File

@@ -0,0 +1,10 @@
$NetBSD: distinfo,v 1.10 2012/07/25 12:07:30 fhajny Exp $
SHA1 (nagios-plugins-1.4.15.tar.gz) = 1faab309c06d37e559490fd852ecb0dc8a8ab610
RMD160 (nagios-plugins-1.4.15.tar.gz) = c2780a3523cf4eaaed34a94c07f5f6bd6fb1f736
Size (nagios-plugins-1.4.15.tar.gz) = 2095419 bytes
SHA1 (patch-ak) = dd9aba7a0930a6448e372b581ba04d62018a973b
SHA1 (patch-al) = 63e28ae36d671e773acfe6aeb45ab7603c112594
SHA1 (patch-am) = adc95ba1037a7d7caab6dde6ca1e27e47754db62
SHA1 (patch-configure) = 1b9f7c4014c0425cda5f93e9fa123a236728f003
SHA1 (patch-lib_utils_base.c) = 7e315711f8ca9ec033841c8f0eb9e037625c84ca

View File

@@ -0,0 +1,70 @@
$NetBSD: patch-ak,v 1.3 2011/04/08 22:49:19 morr Exp $
--- gl/mountlist.c.orig 2010-07-27 20:47:15.000000000 +0000
+++ gl/mountlist.c
@@ -52,7 +52,11 @@
# if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
# define FS_TYPE(Ent) ((Ent).f_fstypename)
# else
-# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
+# ifdef STAT_STATVFS
+# define FS_TYPE(Ent) mnt_names[(Ent).f_fsid]
+# else
+# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
+# endif
# endif
#endif /* MOUNTED_GETFSSTAT */
@@ -99,6 +103,10 @@
# include <sys/statfs.h>
#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
+
#ifdef MOUNTED_LISTMNTENT
# include <mntent.h>
#endif
@@ -169,7 +177,7 @@
#if MOUNTED_GETMNTINFO
-# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME
+# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME && ! STAT_STATVFS
static char *
fstype_to_string (short int t)
{
@@ -266,9 +274,13 @@ fstype_to_string (short int t)
# endif
static char *
+#ifdef STAT_STATVFS
+fsp_to_string (const struct statvfs *fsp)
+#else
fsp_to_string (const struct statfs *fsp)
+#endif
{
-# if HAVE_STRUCT_STATFS_F_FSTYPENAME
+# if defined HAVE_STRUCT_STATFS_F_FSTYPENAME || defined STAT_STATVFS
return (char *) (fsp->f_fstypename);
# else
return fstype_to_string (fsp->f_type);
@@ -592,9 +604,17 @@ read_file_system_list (bool need_fs_type
{
int numsys, counter;
size_t bufsize;
+#ifdef STAT_STATVFS
+ struct statvfs *stats;
+#else
struct statfs *stats;
+#endif
+#ifdef STAT_STATVFS
+ numsys = getfsstat ((struct statvfs *)0, 0L, MNT_NOWAIT);
+#else
numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT);
+#endif
if (numsys < 0)
return (NULL);
if (SIZE_MAX / sizeof *stats <= numsys)

View File

@@ -0,0 +1,92 @@
$NetBSD: patch-al,v 1.3 2011/04/08 22:49:19 morr Exp $
--- contrib/check_axis.sh.orig 2010-07-27 20:47:15.000000000 +0000
+++ contrib/check_axis.sh
@@ -5,7 +5,7 @@ port=$2
usr=$3
pass=$4
-if [ ! "$#" == "4" ]; then
+if [ ! "$#" = "4" ]; then
echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh <host> <port> <username> <password> \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3"
fi
@@ -27,7 +27,7 @@ fi
lines=`cat $tempfile | grep -i $port`
status=`echo $lines | awk '{ print $3 }'`
-if [ "$status" == "Printing" ]; then
+if [ "$status" = "Printing" ]; then
bytes=`echo $lines | awk '{ print $4 }'`;
comments=`echo $lines | tr -d "
" | awk '{ print $5 " " $6 }'`;
@@ -42,48 +42,48 @@ if [ "$comma" -eq "1" ]; then
fi
-if [ "$status" == "Available" ]; then
- if [ "$comments" == "Paper out" ]; then
+if [ "$status" = "Available" ]; then
+ if [ "$comments" = "Paper out" ]; then
exit="1" && stdio="WARNING - Out of paper.";
- elif [ "$comments" == " " ]; then
+ elif [ "$comments" = " " ]; then
exit="0" && stdio="OK - Printer is available but returns no comments.";
- elif [ "$comments" == "No error" ]; then
+ elif [ "$comments" = "No error" ]; then
exit="0" && stdio="OK - No error.";
- elif [ "$comments" == "Ready " ]; then
+ elif [ "$comments" = "Ready " ]; then
exit="0" && stdio="OK - Ready.";
- elif [ "$comments" == "Off line" ]; then
+ elif [ "$comments" = "Off line" ]; then
exit="1" && stdio="WARNING - Printer is off line.";
- elif [ "$comments" == "Out of" ]; then
+ elif [ "$comments" = "Out of" ]; then
exit="1" && stdio="WARNING - Out of paper.";
- elif [ "$comments" == "Busy Out" ]; then
+ elif [ "$comments" = "Busy Out" ]; then
exit="1" && stdio="WARNING - Busy, out of paper.";
- elif [ "$comments" == "Printer off-line" ]; then
+ elif [ "$comments" = "Printer off-line" ]; then
exit="1" && stdio="WARNING - Printer is off line.";
- elif [ "$comments" == "Printer fault" ]; then
+ elif [ "$comments" = "Printer fault" ]; then
exit="2" && stdio="CRITICAL - Printer fault.";
else
exit="3" && stdio="Comments: $comments";
fi
-elif [ "$status" == "Printing" ]; then
- if [ "$comments" == "Printer busy" ]; then
+elif [ "$status" = "Printing" ]; then
+ if [ "$comments" = "Printer busy" ]; then
exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes.";
- elif [ "$comments" == "No error" ]; then
+ elif [ "$comments" = "No error" ]; then
exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes.";
- elif [ "$comments" == "Paper out" ]; then
+ elif [ "$comments" = "Paper out" ]; then
exit="1" && stdio="WARNING - PRINTING. Out of paper.";
- elif [ "$comments" == "Out of" ]; then
+ elif [ "$comments" = "Out of" ]; then
exit="1" && stdio="WARNING - PRINTING. Out of paper. Bytes printed: $bytes.";
- elif [ "$comments" == "Busy Out" ]; then
+ elif [ "$comments" = "Busy Out" ]; then
exit="1" && stdio="WARNING - Busy, out of paper.";
- elif [ "$comments" == "Ready " ]; then
+ elif [ "$comments" = "Ready " ]; then
exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes.";
- elif [ "$comments" == "Printer off-line" ]; then
+ elif [ "$comments" = "Printer off-line" ]; then
exit="1" && stdio="WARNING - PRINTING. Printer is off line.";
- elif [ "$comments" == "Busy " ]; then
+ elif [ "$comments" = "Busy " ]; then
exit="0" && stdio="OK - PRINTING. Busy. Bytes printed: $bytes.";
- elif [ "$comments" == "Off line" ]; then
+ elif [ "$comments" = "Off line" ]; then
exit="1" && stdio="WARNING - PRINTING. Printer is off line.";
- elif [ "$comments" == "Printer fault" ]; then
+ elif [ "$comments" = "Printer fault" ]; then
exit="2" && stdio="CRITICAL - PRINTING. Printer fault. Bytes printed: $bytes.";
else
exit="3" && stdio="Comments: $comments.";

View File

@@ -0,0 +1,56 @@
$NetBSD: patch-am,v 1.2 2011/04/08 22:49:19 morr Exp $
--- contrib/check_mssql.sh.orig 2010-07-27 20:47:15.000000000 +0000
+++ contrib/check_mssql.sh
@@ -35,10 +35,10 @@ pswd=$3
srv=$4
-if [ ! "$#" == "4" ]; then
+if [ ! "$#" = "4" ]; then
echo -e "\nYou did not supply enough arguments. \nUsage: $0 <host> <username> <password> <version> \n \n$0 checks Microsoft SQL Server connectivity. It works with versions 7 and 2000.\n\nYou need a working version of FreeTDS (http://www.freetds.org/) and tsql (included in FreeTDS 6.0+) to connect to the SQL server. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2003. \n\nExample:\n $0 dbserver sa f00bar 2000\n" && exit "3"
-elif [ $tsqlcmd == "" ]; then
+elif [ $tsqlcmd = "" ]; then
echo -e "tsql not found! Please verify you have a working version of tsql (included in the FreeTDS version 6.0+) and enter the full path in the script." && exit "3"
fi
@@ -50,9 +50,9 @@ exit="3"
tmpfile=`$mktempcmd /tmp/$hostname.XXXXXX`
-if [ $srv == "7" ]; then
+if [ $srv = "7" ]; then
spid=7
-elif [ $srv == "2000" ]; then
+elif [ $srv = "2000" ]; then
spid=50
else
echo -e "$srv is not a supported MS SQL Server version!" && exit "3"
@@ -69,7 +69,7 @@ $tsqlcmd -S $hostname -U $usr -P $pswd <
$grepcmd -q "Login failed for user" $errorfile
-if [ "$?" == "0" ]; then
+if [ "$?" = "0" ]; then
$rmcmd -f $tmpfile $resultfile $errorfile;
echo CRITICAL - Could not make connection to SQL server. Login failed.;
exit 2;
@@ -77,7 +77,7 @@ fi
$grepcmd -q "There was a problem connecting to the server" $errorfile
-if [ "$?" == "0" ]; then
+if [ "$?" = "0" ]; then
$rmcmd -f $tmpfile $resultfile $errorfile;
echo CRITICAL - Could not make connection to SQL server. Incorrect server name or SQL service not running.;
exit 2;
@@ -85,7 +85,7 @@ fi
resultfileln=`$catcmd $resultfile | $wccmd -l | $sedcmd 's/ //g'`
-if [ "$resultfileln" == "2" ]; then
+if [ "$resultfileln" = "2" ]; then
$rmcmd -f $tmpfile $resultfile $errorfile;
echo CRITICAL - Could not make connection to SQL server. No data received from host.;
exit 2;

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-configure,v 1.1 2012/07/25 12:07:30 fhajny Exp $
Only build 64bit when MACHINE_ARCH=x86_64, on SunOS.
--- configure.orig 2010-07-27 20:48:13.000000000 +0000
+++ configure
@@ -18068,7 +18068,7 @@ elif test "$ac_cv_uname_s" = "SunOS"; th
ac_cv_ps_cols=9
{ echo "$as_me:$LINENO: result: using nagios-plugins internal ps command (pst3) for solaris" >&5
echo "${ECHO_T}using nagios-plugins internal ps command (pst3) for solaris" >&6; }
- if test `isainfo -b` = 64 ; then
+ if test "$MACHINE_ARCH" = "x86_64" ; then
pst3_use_64bit=1
{ echo "$as_me:$LINENO: using 64bit pst3" >&5
echo "$as_me: using 64bit pst3" >&6;}

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-lib_utils_base.c,v 1.1 2012/05/24 15:26:14 marino Exp $
--- lib/utils_base.c.orig 2010-07-27 20:47:16.000000000 +0000
+++ lib/utils_base.c
@@ -28,6 +28,9 @@
#include <stdarg.h>
#include "utils_base.h"
#include <fcntl.h>
+#ifdef __DragonFly__
+#include <sys/stat.h>
+#endif
#define np_free(ptr) { if(ptr) { free(ptr); ptr = NULL; } }