merge with upstream, check_ups fix
This commit is contained in:
parent
b81765360f
commit
2c18a0bbd6
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -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
|
* 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).
|
such as check_simap (closes: #351847).
|
||||||
* dpkg's conffile handling can't deal with migrating config files
|
* dpkg's conffile handling can't deal with migrating config files
|
||||||
from nagios-plugins to nagios-plugins-foo, so we're now managing
|
from nagios-plugins to nagios-plugins-foo, so we're now managing
|
||||||
|
|
2
debian/patches/00list
vendored
2
debian/patches/00list
vendored
|
@ -5,4 +5,4 @@
|
||||||
18_check_game_cmdline.dpatch
|
18_check_game_cmdline.dpatch
|
||||||
22_check_smb_hostaddress.dpatch
|
22_check_smb_hostaddress.dpatch
|
||||||
23_check_axis.dpatch
|
23_check_axis.dpatch
|
||||||
25_check_tcp.c_warncritopts.diff
|
24_check_ups.dpatch
|
||||||
|
|
36
debian/patches/24_check_ups.dpatch
vendored
Executable file
36
debian/patches/24_check_ups.dpatch
vendored
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||||
|
## 24_check_ups.dpatch by <seanius@debian.org>
|
||||||
|
##
|
||||||
|
## All lines beginning with `## DP:' are a description of the patch.
|
||||||
|
## DP: No description.
|
||||||
|
|
||||||
|
@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"));
|
39
debian/patches/25_check_tcp.c_warncritopts.diff
vendored
39
debian/patches/25_check_tcp.c_warncritopts.diff
vendored
|
@ -1,39 +0,0 @@
|
||||||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
|
||||||
@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':
|
|
Loading…
Reference in a new issue