ports/78147: MAINTAINER UPDATE: nagios-plugins

Blaz Zupan blaz at si.FreeBSD.org
Sun Feb 27 14:30:15 UTC 2005


>Number:         78147
>Category:       ports
>Synopsis:       MAINTAINER UPDATE: nagios-plugins
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 27 14:30:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Blaz Zupan
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD titanic.medinet.si 4.10-RELEASE FreeBSD 4.10-RELEASE #1: Sun Jun 27 16:39:26 CEST 2004 root at bigbrother.amis.net:/usr/obj/usr/src/sys/TITANIC i386


	
>Description:

1. Fix support for MySQL >= 4.1. Submitted by: Gerrit Beine <tux at pinguru.net>
2. Hardcode path to swapinfo, although the configure script works on normal
FreeBSD systems, it fails on pointyhat because it does not have swapinfo

>How-To-Repeat:
	
>Fix:

diff -urN nagios-plugins.old/Makefile nagios-plugins/Makefile
--- nagios-plugins.old/Makefile	Sat Feb 12 20:20:48 2005
+++ nagios-plugins/Makefile	Sun Feb 27 15:11:13 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	nagios-plugins
 PORTVERSION=	1.4
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
diff -urN nagios-plugins.old/files/patch-check_mysql.c nagios-plugins/files/patch-check_mysql.c
--- nagios-plugins.old/files/patch-check_mysql.c	Thu Jan  1 01:00:00 1970
+++ nagios-plugins/files/patch-check_mysql.c	Sun Feb 27 15:12:12 2005
@@ -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 -urN nagios-plugins.old/files/patch-configure.in nagios-plugins/files/patch-configure.in
--- nagios-plugins.old/files/patch-configure.in	Fri Feb 11 22:24:20 2005
+++ nagios-plugins/files/patch-configure.in	Sun Feb 27 15:17:32 2005
@@ -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")

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list