[Pkg-nagios-changes] [pkg-nagios-plugins] 33/413: merge with upstream, check_ups fix

Jan Wagner waja at moszumanska.debian.org
Tue Nov 26 23:13:03 UTC 2013


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-nagios-plugins.

commit 2c18a0bbd6c42726b21c0a8543e36eca4e9ee380
Author: Sean Finney <seanius at debian.org>
Date:   Wed Nov 1 19:18:32 2006 +0000

    merge with upstream, check_ups fix
---
 debian/changelog                                |  6 ++--
 debian/patches/00list                           |  2 +-
 debian/patches/24_check_ups.dpatch              | 36 +++++++++++++++++++++++
 debian/patches/25_check_tcp.c_warncritopts.diff | 39 -------------------------
 4 files changed, 41 insertions(+), 42 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b124e7e..51503ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,9 @@
-nagios-plugins (1.4.3.0cvs.20060707-4) UNRELEASED; urgency=low
+nagios-plugins (1.4.4-1) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
-  * include fix for braindead behaviour in check_tcp based plugins
+  * new upstream release.  actually, we've been basing previous versions
+    on cvs snapshots so the changes aren't that big.
+  * upstream includes fix for warn/crit handling in check_tcp based plugins
     such as check_simap (closes: #351847).
   * dpkg's conffile handling can't deal with migrating config files
     from nagios-plugins to nagios-plugins-foo, so we're now managing
diff --git a/debian/patches/00list b/debian/patches/00list
index b558831..daf7e2a 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -5,4 +5,4 @@
 18_check_game_cmdline.dpatch
 22_check_smb_hostaddress.dpatch
 23_check_axis.dpatch
-25_check_tcp.c_warncritopts.diff
+24_check_ups.dpatch
diff --git a/debian/patches/24_check_ups.dpatch b/debian/patches/24_check_ups.dpatch
new file mode 100755
index 0000000..105b970
--- /dev/null
+++ b/debian/patches/24_check_ups.dpatch
@@ -0,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 24_check_ups.dpatch by  <seanius at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad nagios-plugins-1.4.4~/plugins/check_ups.c nagios-plugins-1.4.4/plugins/check_ups.c
+--- nagios-plugins-1.4.4~/plugins/check_ups.c	2006-06-18 21:36:48.000000000 +0200
++++ nagios-plugins-1.4.4/plugins/check_ups.c	2006-11-01 20:17:30.000000000 +0100
+@@ -393,13 +393,13 @@
+ 	/*  char command[MAX_INPUT_BUFFER]; */
+ 	char temp_buffer[MAX_INPUT_BUFFER];
+ 	char send_buffer[MAX_INPUT_BUFFER];
+-	char *ptr;
++	char *ptr, *end = NULL;
+ 	int len;
+ 
+ 	*buf=0;
+ 	
+ 	/* create the command string to send to the UPS daemon */
+-	sprintf (send_buffer, "GET VAR %s %s\n", ups_name, varname);
++	sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname);
+ 
+ 	/* send the command to the daemon and get a response back */
+ 	if (process_tcp_request
+@@ -433,6 +433,9 @@
+ 	}
+ 
+ 	ptr = temp_buffer + strlen (varname) + strlen (ups_name) + 6;
++	end = strchr(ptr, '\n');
++	if (end)
++		*end = 0;
+ 	len = strlen(ptr);
+ 	if (len < 2 || ptr[0] != '"' || ptr[len-1] != '"') {
+ 		printf ("%s\n", _("Error: unable to parse variable"));
diff --git a/debian/patches/25_check_tcp.c_warncritopts.diff b/debian/patches/25_check_tcp.c_warncritopts.diff
deleted file mode 100644
index 49a316c..0000000
--- a/debian/patches/25_check_tcp.c_warncritopts.diff
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
- at DPATCH@
-diff -u -u -r1.78 check_tcp.c
---- old/plugins/check_tcp.c	29 Mar 2006 16:33:36 -0000	1.78
-+++ new/plugins/check_tcp.c	2 Sep 2006 20:28:58 -0000
-@@ -373,8 +373,8 @@
- 	int option = 0;
- 	static struct option longopts[] = {
- 		{"hostname", required_argument, 0, 'H'},
--		{"critical-time", required_argument, 0, 'c'},
--		{"warning-time", required_argument, 0, 'w'},
-+		{"critical", required_argument, 0, 'c'},
-+		{"warning", required_argument, 0, 'w'},
- 		{"critical-codes", required_argument, 0, 'C'},
- 		{"warning-codes", required_argument, 0, 'W'},
- 		{"timeout", required_argument, 0, 't'},
-@@ -454,20 +454,14 @@
- 			server_address = optarg;
- 			break;
- 		case 'c':                 /* critical */
--			if (!is_intnonneg (optarg))
--				usage4 (_("Critical threshold must be a positive integer"));
--			else
--				critical_time = strtod (optarg, NULL);
-+			critical_time = strtod (optarg, NULL);
- 			flags |= FLAG_TIME_CRIT;
- 			break;
- 		case 'j':		  /* hide output */
- 			flags |= FLAG_HIDE_OUTPUT;
- 			break;
- 		case 'w':                 /* warning */
--			if (!is_intnonneg (optarg))
--				usage4 (_("Warning threshold must be a positive integer"));
--			else
--				warning_time = strtod (optarg, NULL);
-+			warning_time = strtod (optarg, NULL);
- 			flags |= FLAG_TIME_WARN;
- 			break;
- 		case 'C':

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins.git



More information about the Pkg-nagios-changes mailing list