aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2005-02-28 02:41:40 +0800
committersem <sem@FreeBSD.org>2005-02-28 02:41:40 +0800
commit0ca87e998bd6d9462d44f39d22e1bb4a7b139326 (patch)
tree2cf0aa8eaf5c12803d84313ab1c2bceedd34017a /net-mgmt
parente621129f9f8d8cec619fcf440e88bf960ed1eed3 (diff)
downloadfreebsd-ports-gnome-0ca87e998bd6d9462d44f39d22e1bb4a7b139326.tar.gz
freebsd-ports-gnome-0ca87e998bd6d9462d44f39d22e1bb4a7b139326.tar.zst
freebsd-ports-gnome-0ca87e998bd6d9462d44f39d22e1bb4a7b139326.zip
- Fix support for MySQL >= 4.1. Submitted by: Gerrit Beine <tux@pinguru.net>
- Hardcode path to swapinfo, although the configure script works on normal FreeBSD systems, it fails on pointyhat because it does not have swapinfo PR: ports/78147 Submitted by: maintainer
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/nagios-plugins/Makefile1
-rw-r--r--net-mgmt/nagios-plugins/files/patch-check_mysql.c20
-rw-r--r--net-mgmt/nagios-plugins/files/patch-configure.in57
3 files changed, 69 insertions, 9 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile
index d0804f5f4363..40752f2e3cd1 100644
--- a/net-mgmt/nagios-plugins/Makefile
+++ b/net-mgmt/nagios-plugins/Makefile
@@ -7,6 +7,7 @@
PORTNAME= nagios-plugins
PORTVERSION= 1.4
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
diff --git a/net-mgmt/nagios-plugins/files/patch-check_mysql.c b/net-mgmt/nagios-plugins/files/patch-check_mysql.c
new file mode 100644
index 000000000000..998ad4788797
--- /dev/null
+++ b/net-mgmt/nagios-plugins/files/patch-check_mysql.c
@@ -0,0 +1,20 @@
+--- plugins/check_mysql.c.orig Sun Dec 26 00:17:44 2004
++++ plugins/check_mysql.c Sun Feb 20 14:12:10 2005
+@@ -123,8 +123,16 @@
+ die (STATE_CRITICAL, "%s\n", slaveresult);
+ }
+
++ } else if (mysql_field_count (&mysql) == 33) {
++ /* mysql >= 4.1.1 */
++ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[10], row[11]);
++ if (strcmp (row[10], "Yes") != 0 || strcmp (row[11], "Yes") != 0) {
++ mysql_free_result (res);
++ mysql_close (&mysql);
++ die (STATE_CRITICAL, "%s\n", slaveresult);
++ }
+ } else {
+- /* mysql 4.x.x */
++ /* mysql 4.0.x or 4.1.0 */
+ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s", row[9], row[10]);
+ if (strcmp (row[9], "Yes") != 0 || strcmp (row[10], "Yes") != 0) {
+ mysql_free_result (res);
diff --git a/net-mgmt/nagios-plugins/files/patch-configure.in b/net-mgmt/nagios-plugins/files/patch-configure.in
index a0acf7a81ffb..13ddd2aec2a1 100644
--- a/net-mgmt/nagios-plugins/files/patch-configure.in
+++ b/net-mgmt/nagios-plugins/files/patch-configure.in
@@ -1,5 +1,5 @@
---- configure.in.orig Thu Dec 30 15:19:37 2004
-+++ configure.in Sun Jan 30 13:16:43 2005
+--- configure.in.orig Fri Feb 4 01:44:27 2005
++++ configure.in Sun Feb 27 15:17:24 2005
@@ -10,7 +10,7 @@
RELEASE=1
AC_SUBST(RELEASE)
@@ -68,7 +68,7 @@
dnl Check for mysql libraries
-@@ -581,234 +588,11 @@
+@@ -585,234 +592,11 @@
AC_PATH_PROG(PATH_TO_PS,ps)
@@ -308,7 +308,7 @@
if test -n "$ac_cv_ps_varlist" ; then
AC_DEFINE_UNQUOTED(PS_VARLIST,$ac_cv_ps_varlist,
-@@ -1161,6 +945,8 @@
+@@ -1165,6 +949,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who",
[path and arguments for invoking 'who'])
@@ -317,7 +317,7 @@
AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
if test -x "$PATH_TO_SNMPGET"
then
-@@ -1183,7 +969,10 @@
+@@ -1187,7 +973,10 @@
else
AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins])
fi
@@ -328,7 +328,7 @@
AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
AC_PATH_PROG(PATH_TO_QSTAT,qstat)
-@@ -1205,7 +994,10 @@
+@@ -1209,7 +998,10 @@
AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat",
[path to qstat/quakestat])
fi
@@ -339,11 +339,50 @@
AC_PATH_PROG(PATH_TO_FPING,fping)
if test -x "$PATH_TO_FPING"
then
-@@ -1213,6 +1005,7 @@
- EXTRAS="$EXTRAS check_fping"
+@@ -1218,6 +1010,7 @@
else
AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin])
-+fi
fi
++fi
AC_PATH_PROG(PATH_TO_SSH,ssh)
+
+@@ -1280,32 +1073,12 @@
+ dnl end if for PATH_TO_SWAP
+ fi
+
+-AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
+-if (test -n "$PATH_TO_SWAPINFO")
+-then
+-AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format])
+-if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null]
+-then
+- ac_cv_have_swap=yes
+- ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
+-
+- if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
+- then
+- ac_cv_swap_format=["%*s %f %*d %f"]
+- ac_cv_swap_conv=1024
+- AC_MSG_RESULT([using FreeBSD format swapinfo])
+- fi
+-
+-elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
+-then
+- ac_cv_have_swap=yes
+- ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM",
+- ac_cv_swap_format=["%*s %f %*d %f"]
+- ac_cv_swap_conv=1024
+- AC_MSG_RESULT([using HP-UX format swapinfo])
+-fi
+-dnl end if for PATH_TO_SWAPINFO
+-fi
++PATH_TO_SWAPINFO="/usr/sbin/swapinfo"
++ac_cv_have_swap=yes
++ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
++ac_cv_swap_format=["%*s %f %*d %f"]
++ac_cv_swap_conv=1024
++AC_MSG_RESULT([using FreeBSD format swapinfo])
+
+ AC_PATH_PROG(PATH_TO_LSPS,lsps)
+ if (test -n "$PATH_TO_LSPS")