[76989] trunk/dports/net/nagios-plugins
markd at macports.org
markd at macports.org
Wed Mar 16 09:14:18 PDT 2011
Revision: 76989
http://trac.macports.org/changeset/76989
Author: markd at macports.org
Date: 2011-03-16 09:14:15 -0700 (Wed, 16 Mar 2011)
Log Message:
-----------
Add a check_procs.c patch from nagios-plugins git repo.
Modified Paths:
--------------
trunk/dports/net/nagios-plugins/Portfile
Added Paths:
-----------
trunk/dports/net/nagios-plugins/files/patch-plugins-check_procs.c.diff
Modified: trunk/dports/net/nagios-plugins/Portfile
===================================================================
--- trunk/dports/net/nagios-plugins/Portfile 2011-03-16 15:29:06 UTC (rev 76988)
+++ trunk/dports/net/nagios-plugins/Portfile 2011-03-16 16:14:15 UTC (rev 76989)
@@ -5,9 +5,9 @@
PortGroup perl5 1.0
name nagios-plugins
version 1.4.15
-revision 1
+revision 2
categories net
-maintainers markd
+maintainers markd openmaintainer
platforms darwin
description Nagios plugins for the Nagios host and service monitor
@@ -19,6 +19,7 @@
homepage http://nagios.org
master_sites sourceforge:nagiosplug
checksums md5 56abd6ade8aa860b38c4ca4a6ac5ab0d
+patchfiles patch-plugins-check_procs.c.diff
destroot.destdir prefix=${prefix} DESTDIR=${destroot}
Added: trunk/dports/net/nagios-plugins/files/patch-plugins-check_procs.c.diff
===================================================================
--- trunk/dports/net/nagios-plugins/files/patch-plugins-check_procs.c.diff (rev 0)
+++ trunk/dports/net/nagios-plugins/files/patch-plugins-check_procs.c.diff 2011-03-16 16:14:15 UTC (rev 76989)
@@ -0,0 +1,27 @@
+--- plugins/check_procs.c.orig 2010-07-27 13:47:16.000000000 -0700
++++ plugins/check_procs.c 2011-03-16 09:03:13.000000000 -0700
+@@ -318,6 +318,8 @@
+ int err;
+ int cflags = REG_NOSUB | REG_EXTENDED;
+ char errbuf[MAX_INPUT_BUFFER];
++ char *temp_string;
++ int i=0;
+ static struct option longopts[] = {
+ {"warning", required_argument, 0, 'w'},
+ {"critical", required_argument, 0, 'c'},
+@@ -450,7 +452,14 @@
+ regerror (err, &re_args, errbuf, MAX_INPUT_BUFFER);
+ die (STATE_UNKNOWN, "PROCS %s: %s - %s\n", _("UNKNOWN"), _("Could not compile regular expression"), errbuf);
+ }
+- asprintf (&fmt, "%s%sregex args '%s'", (fmt ? fmt : ""), (options ? ", " : ""), optarg);
++ /* Strip off any | within the regex optarg */
++ temp_string = strdup(optarg);
++ while(temp_string[i]!='\0'){
++ if(temp_string[i]=='|')
++ temp_string[i]=',';
++ i++;
++ }
++ asprintf (&fmt, "%s%sregex args '%s'", (fmt ? fmt : ""), (options ? ", " : ""), temp_string);
+ options |= EREG_ARGS;
+ break;
+ case 'r': /* RSS */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110316/2bbbd6b9/attachment.html>
More information about the macports-changes
mailing list