1 |
idl0r 12/07/31 21:53:01 |
2 |
|
3 |
Added: nagios-plugins-1.4.16-contrib.patch |
4 |
Log: |
5 |
Non-maitainer bump, fixes bug 428560, bug 411497 and bug 366403. |
6 |
|
7 |
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-analyzer/nagios-plugins/files/nagios-plugins-1.4.16-contrib.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.16-contrib.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.16-contrib.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: nagios-plugins-1.4.16-contrib.patch |
16 |
=================================================================== |
17 |
From 48c83ab1bc1ef596129fad8634b8ec09f4a1e329 Mon Sep 17 00:00:00 2001 |
18 |
From: Christian Ruppert <idl0r@g.o> |
19 |
Date: Tue, 31 Jul 2012 23:47:20 +0200 |
20 |
Subject: [PATCH] Fix some paths, bug 366403 |
21 |
|
22 |
--- |
23 |
contrib/check_apc_ups.pl | 2 +- |
24 |
contrib/check_appletalk.pl | 2 +- |
25 |
contrib/check_dns_random.pl | 9 ++++----- |
26 |
contrib/check_flexlm.pl | 2 +- |
27 |
contrib/check_ica_master_browser.pl | 2 +- |
28 |
contrib/check_ica_metaframe_pub_apps.pl | 2 +- |
29 |
contrib/check_inodes-freebsd.pl | 2 +- |
30 |
contrib/check_linux_raid.pl | 2 +- |
31 |
contrib/check_lmmon.pl | 2 +- |
32 |
contrib/check_lotus.pl | 2 +- |
33 |
contrib/check_ms_spooler.pl | 2 +- |
34 |
contrib/check_nagios_db.pl | 4 ++-- |
35 |
contrib/check_nmap.py | 2 +- |
36 |
contrib/check_oracle_tbs | 4 ++-- |
37 |
contrib/check_pfstate | 2 +- |
38 |
contrib/check_snmp_disk_monitor.pl | 4 ++-- |
39 |
contrib/check_snmp_printer.pl | 2 +- |
40 |
contrib/check_snmp_process_monitor.pl | 6 +++--- |
41 |
contrib/check_snmp_procs.pl | 2 +- |
42 |
contrib/check_wins.pl | 2 +- |
43 |
contrib/sched_downtime.pl | 2 +- |
44 |
21 files changed, 29 insertions(+), 30 deletions(-) |
45 |
|
46 |
diff --git a/contrib/check_apc_ups.pl b/contrib/check_apc_ups.pl |
47 |
index 6bf1766..758da2f 100644 |
48 |
--- a/contrib/check_apc_ups.pl |
49 |
+++ b/contrib/check_apc_ups.pl |
50 |
@@ -13,7 +13,7 @@ use strict; |
51 |
use Getopt::Long; |
52 |
use vars qw($opt_V $opt_h $opt_H $opt_T $opt_t $opt_R $opt_r |
53 |
$opt_L $opt_l $PROGNAME); |
54 |
-use lib "/usr/local/nagios/libexec"; |
55 |
+use lib "/usr/lib/nagios/plugins"; |
56 |
use utils qw(%ERRORS &print_revision &support &usage); |
57 |
|
58 |
sub print_help (); |
59 |
diff --git a/contrib/check_appletalk.pl b/contrib/check_appletalk.pl |
60 |
index 9277686..2b18084 100644 |
61 |
--- a/contrib/check_appletalk.pl |
62 |
+++ b/contrib/check_appletalk.pl |
63 |
@@ -22,7 +22,7 @@ BEGIN { |
64 |
} |
65 |
|
66 |
use strict; |
67 |
-use lib "/usr/local/nagios/libexec"; |
68 |
+use lib "/usr/lib/nagios/plugins"; |
69 |
|
70 |
use utils qw($TIMEOUT %ERRORS &print_revision &support); |
71 |
use vars qw($PROGNAME); |
72 |
diff --git a/contrib/check_dns_random.pl b/contrib/check_dns_random.pl |
73 |
index 4bed412..efd5587 100644 |
74 |
--- a/contrib/check_dns_random.pl |
75 |
+++ b/contrib/check_dns_random.pl |
76 |
@@ -1,4 +1,4 @@ |
77 |
-#!/usr/bin/perl |
78 |
+#!/usr/bin/perl -w |
79 |
# ------------------------------------------------------------------------------ |
80 |
# File Name: check_dns_random.pl |
81 |
# Author: Richard Mayhew - South Africa |
82 |
@@ -33,9 +33,9 @@ $|=1; |
83 |
|
84 |
my $host = shift || &usage; |
85 |
|
86 |
-my $domainfile = "/usr/local/nagios/etc/domains.list"; |
87 |
+my $domainfile = "/etc/domains.list"; |
88 |
my $wc = `/usr/bin/wc -l $domainfile`; |
89 |
-my $check = "/usr/local/nagios/libexec/check_dns"; |
90 |
+my $check = "/usr/lib/nagios/plugins/check_dns"; |
91 |
my $x = 0; |
92 |
my $srv_file = ""; |
93 |
my $z = ""; |
94 |
@@ -49,8 +49,7 @@ open(DOMAIN,"<$domainfile") or die "Error Opening $domainfile File!\n"; |
95 |
my @data = split(/\n/,$srv_file); |
96 |
|
97 |
chomp $wc; |
98 |
-$wc =~ s/ //g; |
99 |
-$wc =~ s/domains//g; |
100 |
+$wc =~ s/([[:digit:]]+) .*/$1/g; |
101 |
|
102 |
$x = rand $wc; |
103 |
($z,$y) = split(/\./,$x); |
104 |
diff --git a/contrib/check_flexlm.pl b/contrib/check_flexlm.pl |
105 |
index 8fa0e33..3b9b57d 100644 |
106 |
--- a/contrib/check_flexlm.pl |
107 |
+++ b/contrib/check_flexlm.pl |
108 |
@@ -1,4 +1,4 @@ |
109 |
-#!/usr/local/bin/perl |
110 |
+#!/usr/bin/perl |
111 |
# |
112 |
# usage: |
113 |
# check_flexlm.pl license_file |
114 |
diff --git a/contrib/check_ica_master_browser.pl b/contrib/check_ica_master_browser.pl |
115 |
index 922e718..ed8b9db 100755 |
116 |
--- a/contrib/check_ica_master_browser.pl |
117 |
+++ b/contrib/check_ica_master_browser.pl |
118 |
@@ -12,7 +12,7 @@ use IO::Socket; |
119 |
use IO::Select; |
120 |
use Getopt::Long ; |
121 |
|
122 |
-use lib qw(/usr/local/nagios/libexec) ; |
123 |
+use lib qw(/usr/lib/nagios/plugins) ; |
124 |
use utils qw(%ERRORS &print_revision &support &usage); |
125 |
use packet_utils qw(&pdump &tethereal) ; |
126 |
|
127 |
diff --git a/contrib/check_ica_metaframe_pub_apps.pl b/contrib/check_ica_metaframe_pub_apps.pl |
128 |
index 0edbdca..8110030 100755 |
129 |
--- a/contrib/check_ica_metaframe_pub_apps.pl |
130 |
+++ b/contrib/check_ica_metaframe_pub_apps.pl |
131 |
@@ -17,7 +17,7 @@ use Getopt::Long ; |
132 |
|
133 |
my ($bcast_addr, $timeout, $debug, @citrix_servers, $crit_pub_apps, $warn_pub_apps, $long_list) ; |
134 |
|
135 |
-use lib qw(/usr/local/nagios/libexec) ; |
136 |
+use lib qw(/usr/lib/nagios/plugins) ; |
137 |
use utils qw(%ERRORS &print_revision &support &usage) ; |
138 |
use packet_utils qw(&pdump &tethereal) ; |
139 |
|
140 |
diff --git a/contrib/check_inodes-freebsd.pl b/contrib/check_inodes-freebsd.pl |
141 |
index d66e5e3..ebd1f49 100644 |
142 |
--- a/contrib/check_inodes-freebsd.pl |
143 |
+++ b/contrib/check_inodes-freebsd.pl |
144 |
@@ -15,7 +15,7 @@ |
145 |
use strict; |
146 |
use Getopt::Long; |
147 |
use vars qw($opt_V $opt_h $opt_w $opt_c $opt_f $verbose $PROGNAME); |
148 |
-use lib "/usr/local/libexec/nagios" ; |
149 |
+use lib "/usr/lib/nagios/plugins" ; |
150 |
use utils qw($TIMEOUT %ERRORS &print_revision &support); |
151 |
|
152 |
my $df = "/bin/df"; |
153 |
diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl |
154 |
index 77e75f6..ab982cd 100644 |
155 |
--- a/contrib/check_linux_raid.pl |
156 |
+++ b/contrib/check_linux_raid.pl |
157 |
@@ -23,7 +23,7 @@ |
158 |
# WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min |
159 |
|
160 |
use strict; |
161 |
-use lib "/usr/local/nagios/libexec"; |
162 |
+use lib "/usr/lib/nagios/plugins"; |
163 |
use utils qw(%ERRORS); |
164 |
|
165 |
# die with an error if we're not on Linux |
166 |
diff --git a/contrib/check_lmmon.pl b/contrib/check_lmmon.pl |
167 |
index bf4b438..7fb471b 100644 |
168 |
--- a/contrib/check_lmmon.pl |
169 |
+++ b/contrib/check_lmmon.pl |
170 |
@@ -6,7 +6,7 @@ if ($#ARGV < 1) { |
171 |
print "Usage: $0 <critical temp> <warning temp> <normal temp>\n"; |
172 |
exit; } $crit = shift; $warn = shift; $norm = shift; if ($warn > |
173 |
$crit) { print "Warning level cannot be greater than critical |
174 |
-level!\n"; exit; } @b = qx{/usr/local/bin/lmmon -s}; foreach(@b) { @c |
175 |
+level!\n"; exit; } @b = qx{/usr/bin/lmmon -s}; foreach(@b) { @c |
176 |
= split(/ \/ /, $_); $d = $c[1]; } @e = split(/F/, $d); $f = $e[0]; |
177 |
|
178 |
$status = "$f degrees F\n"; |
179 |
diff --git a/contrib/check_lotus.pl b/contrib/check_lotus.pl |
180 |
index 8bedced..9cda571 100755 |
181 |
--- a/contrib/check_lotus.pl |
182 |
+++ b/contrib/check_lotus.pl |
183 |
@@ -17,7 +17,7 @@ use Getopt::Long ; |
184 |
|
185 |
my ($timeout, $debug, $lotus_host, $server, $indiv_dn, $packet_debug) ; |
186 |
|
187 |
-use lib qw(/usr/local/nagios/libexec) ; |
188 |
+use lib qw(/usr/lib/nagios/plugins) ; |
189 |
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage) ; |
190 |
use packet_utils qw(pdump &tethereal) ; |
191 |
|
192 |
diff --git a/contrib/check_ms_spooler.pl b/contrib/check_ms_spooler.pl |
193 |
index 3a80a76..748203c 100755 |
194 |
--- a/contrib/check_ms_spooler.pl |
195 |
+++ b/contrib/check_ms_spooler.pl |
196 |
@@ -52,7 +52,7 @@ sub version (); |
197 |
|
198 |
delete @ENV{'PATH', 'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; |
199 |
|
200 |
-use constant SMBCLIENT_PATH => '/usr/local/samba/bin/smbclient' ; |
201 |
+use constant SMBCLIENT_PATH => '/usr/bin/smbclient' ; |
202 |
use constant MAX_QUEUES_TO_CHECK => 20 ; # So that the check doesn't take longer than $TIMEOUT |
203 |
|
204 |
use constant SMBCLIENT_SVC => sub { return `${\SMBCLIENT_PATH} -L //$_[0] -U $_[1]%$_[2]` } ; |
205 |
diff --git a/contrib/check_nagios_db.pl b/contrib/check_nagios_db.pl |
206 |
index 5811d7c..3774ab0 100644 |
207 |
--- a/contrib/check_nagios_db.pl |
208 |
+++ b/contrib/check_nagios_db.pl |
209 |
@@ -1,4 +1,4 @@ |
210 |
-#!/usr/local/bin/perl -w |
211 |
+#!/usr/bin/perl -w |
212 |
|
213 |
use strict; |
214 |
$|++; |
215 |
@@ -12,7 +12,7 @@ use DBI; |
216 |
|
217 |
my $driver = "mysql"; |
218 |
|
219 |
-my $CFG_DEF = "/opt/nagios/etc/cgi.cfg"; |
220 |
+my $CFG_DEF = "/etc/nagios/cgi.cfg"; |
221 |
my $QUERY = "select *, UNIX_TIMESTAMP(last_update) as ut from programstatus;"; |
222 |
my $EXPIRE_DEF = 5; ## expressed in minutes |
223 |
my $PROCCNT = 0; |
224 |
diff --git a/contrib/check_nmap.py b/contrib/check_nmap.py |
225 |
index 07f6d7f..07e2e54 100644 |
226 |
--- a/contrib/check_nmap.py |
227 |
+++ b/contrib/check_nmap.py |
228 |
@@ -54,7 +54,7 @@ from getopt import getopt |
229 |
import utils |
230 |
|
231 |
# Where temp files should be placed |
232 |
-tempfile.tempdir='/usr/local/nagios/var' |
233 |
+tempfile.tempdir='/var/nagios' |
234 |
|
235 |
# Base name for tempfile |
236 |
tempfile.template='check_nmap_tmp.' |
237 |
diff --git a/contrib/check_oracle_tbs b/contrib/check_oracle_tbs |
238 |
index 8281a4e..b35a232 100644 |
239 |
--- a/contrib/check_oracle_tbs |
240 |
+++ b/contrib/check_oracle_tbs |
241 |
@@ -1,4 +1,4 @@ |
242 |
-#!/usr/local/bin/perl -w |
243 |
+#!/usr/bin/perl -w |
244 |
|
245 |
# (c)2004 John Koyle, RFP Depot, LLC. |
246 |
# This is free software use it however you would like. |
247 |
@@ -6,7 +6,7 @@ |
248 |
use strict; |
249 |
use DBI; |
250 |
use Getopt::Long 2.16; |
251 |
-use lib "/usr/local/nagios/libexec"; |
252 |
+use lib "/usr/lib/nagios/plugins"; |
253 |
use utils qw(%ERRORS); |
254 |
|
255 |
|
256 |
diff --git a/contrib/check_pfstate b/contrib/check_pfstate |
257 |
index 57dde3f..14d15f4 100644 |
258 |
--- a/contrib/check_pfstate |
259 |
+++ b/contrib/check_pfstate |
260 |
@@ -3,7 +3,7 @@ |
261 |
use strict; |
262 |
use Getopt::Long; |
263 |
use vars qw($opt_V $opt_h $opt_P $opt_H $opt_w $opt_c $PROGNAME); |
264 |
-use lib "/usr/local/nagios/libexec" ; |
265 |
+use lib "/usr/lib/nagios/plugins" ; |
266 |
use utils qw(%ERRORS &print_revision &support &usage); |
267 |
|
268 |
my $remote_user = "root"; |
269 |
diff --git a/contrib/check_snmp_disk_monitor.pl b/contrib/check_snmp_disk_monitor.pl |
270 |
index 9a2edaa..f752afb 100644 |
271 |
--- a/contrib/check_snmp_disk_monitor.pl |
272 |
+++ b/contrib/check_snmp_disk_monitor.pl |
273 |
@@ -1,4 +1,4 @@ |
274 |
-#!/usr/local/bin/perl |
275 |
+#!/usr/bin/perl |
276 |
# author: Al Tobey <albert.tobey@×××××××××××××××.com> |
277 |
# what: monitor diskspace using the host-resources mib |
278 |
# license: GPL - http://www.fsf.org/licenses/gpl.txt |
279 |
@@ -7,7 +7,7 @@ |
280 |
|
281 |
use strict; |
282 |
require 5.6.0; |
283 |
-use lib qw( /opt/nagios/libexec ); |
284 |
+use lib qw( /usr/lib/nagios/plugins ); |
285 |
use utils qw(%ERRORS $TIMEOUT &print_revision &support &usage); |
286 |
use SNMP 5.0; |
287 |
use Getopt::Long; |
288 |
diff --git a/contrib/check_snmp_printer.pl b/contrib/check_snmp_printer.pl |
289 |
index cc7943b..83b05af 100755 |
290 |
--- a/contrib/check_snmp_printer.pl |
291 |
+++ b/contrib/check_snmp_printer.pl |
292 |
@@ -1,4 +1,4 @@ |
293 |
-#!/usr/local/bin/perl -w |
294 |
+#!/usr/bin/perl -w |
295 |
|
296 |
# check_snmp_printer - check for printer status via snmp |
297 |
# Supports both standard PRINT-MIB (RFC-1759) and HP Enterprise print-mib |
298 |
diff --git a/contrib/check_snmp_process_monitor.pl b/contrib/check_snmp_process_monitor.pl |
299 |
index 0f44597..abfd40a 100644 |
300 |
--- a/contrib/check_snmp_process_monitor.pl |
301 |
+++ b/contrib/check_snmp_process_monitor.pl |
302 |
@@ -1,4 +1,4 @@ |
303 |
-#!/usr/local/bin/perl |
304 |
+#!/usr/bin/perl |
305 |
# author: Al Tobey <albert.tobey@×××××××××××××××.com> |
306 |
# what: monitor a process using the host-resources mib |
307 |
# license: GPL - http://www.fsf.org/licenses/gpl.txt |
308 |
@@ -15,7 +15,7 @@ |
309 |
|
310 |
use strict; |
311 |
require 5.6.0; |
312 |
-use lib qw( /opt/nagios/libexec /usr/local/libexec ); |
313 |
+use lib qw( /usr/lib/nagios/plugins ); |
314 |
use utils qw(%ERRORS $TIMEOUT &print_revision &support &usage); |
315 |
use SNMP 5.0; |
316 |
use Getopt::Long; |
317 |
@@ -37,7 +37,7 @@ $opt_nocache = undef; |
318 |
$cache_exp = 600; |
319 |
$exit = $ERRORS{OK}; |
320 |
$interpreters = '(perl|/bin/sh|/usr/bin/sh|/bin/bash|/bin/ksh|python)'; |
321 |
-our $cachefile = '/var/opt/nagios/tmp/'; # completed later |
322 |
+our $cachefile = '/var/nagios/tmp/'; # completed later |
323 |
our %processes = (); |
324 |
|
325 |
sub process_options { |
326 |
diff --git a/contrib/check_snmp_procs.pl b/contrib/check_snmp_procs.pl |
327 |
index 4d19ff1..de5a8fe 100644 |
328 |
--- a/contrib/check_snmp_procs.pl |
329 |
+++ b/contrib/check_snmp_procs.pl |
330 |
@@ -35,7 +35,7 @@ |
331 |
#use strict; |
332 |
use Getopt::Long; |
333 |
use Net::SNMP qw (oid_lex_sort oid_base_match SNMP_VERSION_1); |
334 |
-use lib "/usr/local/nagios/libexec"; |
335 |
+use lib "/usr/lib/nagios/plugins"; |
336 |
use utils qw(%ERRORS &print_revision &support &usage); |
337 |
|
338 |
my $PROGNAME="check_snmp_procs"; |
339 |
diff --git a/contrib/check_wins.pl b/contrib/check_wins.pl |
340 |
index f11f864..701fa30 100755 |
341 |
--- a/contrib/check_wins.pl |
342 |
+++ b/contrib/check_wins.pl |
343 |
@@ -17,7 +17,7 @@ use strict ; |
344 |
use Getopt::Long ; |
345 |
use vars qw($opt_H $opt_D $opt_W $opt_T $debug @my_dcs); |
346 |
|
347 |
-use lib '/usr/local/nagios/libexec/' ; |
348 |
+use lib '/usr/lib/nagios/plugins/' ; |
349 |
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); |
350 |
|
351 |
my $PROGNAME = 'check_wins' ; |
352 |
diff --git a/contrib/sched_downtime.pl b/contrib/sched_downtime.pl |
353 |
index b46b482..1e358f4 100644 |
354 |
--- a/contrib/sched_downtime.pl |
355 |
+++ b/contrib/sched_downtime.pl |
356 |
@@ -7,7 +7,7 @@ |
357 |
# |
358 |
use POSIX qw(strtol); |
359 |
|
360 |
-my $command_file = '/usr/local/nagios/var/rw/nagios.cmd'; |
361 |
+my $command_file = '/var/nagios/rw/nagios.cmd'; |
362 |
|
363 |
my $hour = (60*60); |
364 |
my $next_day = (24*60*60); |
365 |
-- |
366 |
1.7.8.6 |