[-]
[+]
|
Changed |
check_diskio.spec
|
|
[-]
[+]
|
Changed |
check_diskio-3.0.1.tar.gz/Changes
^
|
@@ -1,3 +1,7 @@
+2009-05-15 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_diskio: package variables to cope with embedded perl
+
2009-01-20 Matteo Corti <matteo.corti@id.ethz.ch>
* check_diskio: detect physical devices for LVM
|
[-]
[+]
|
Changed |
check_diskio-3.0.1.tar.gz/check_diskio
^
|
@@ -15,17 +15,17 @@
# enable substitution with:
# $ svn propset svn:keywords "Id Revision HeadURL Source Date"
#
-# $Id: check_diskio 1042 2009-01-20 16:37:09Z corti $
-# $Revision: 1042 $
+# $Id: check_diskio 1057 2009-05-15 17:54:39Z corti $
+# $Revision: 1057 $
# $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_diskio/check_diskio $
-# $Date: 2009-01-20 17:37:09 +0100 (Tue, 20 Jan 2009) $
+# $Date: 2009-05-15 19:54:39 +0200 (Fri, 15 May 2009) $
use 5.008;
use strict;
use warnings;
use Carp;
-use version; our $VERSION = '3.0.0';
+use version; our $VERSION = '3.0.1';
use Array::Unique;
use English qw(-no_match_vars);
@@ -52,17 +52,25 @@
Readonly my $bytes_per_megabit => 131_072;
Readonly my $bytes_per_megabyte => 1_048_576;
-my $format;
-my $plugin;
-my $threshold;
-my $options;
-
-my %tmp_files;
-my %diskio;
-my %diskio_w;
-my %diskio_r;
-
-my @stat_file;
+# IMPORTANT: Nagios plugins could be executed using embedded perl in this case
+# the main routine would be executed as a subroutine and all the
+# declared subroutines would therefore be inner subroutines
+# This will cause all the global lexical variables not to stay shared
+# in the subroutines!
+#
+# All variables are therefore declared as package variables...
+#
+use vars qw(
+ $format
+ $plugin
+ $threshold
+ $options
+ %tmp_files
+ %diskio
+ %diskio_w
+ %diskio_r
+ @stat_file
+);
##############################################################################
# subroutines
@@ -639,7 +647,7 @@
}
else {
- print { *STDERR } "Warning: cannot check LVM volumes if not root\n";
+ print {*STDERR} "Warning: cannot check LVM volumes if not root\n";
verbose "Not root: skipping LVM check\n";
|
[-]
[+]
|
Changed |
check_diskio-3.0.1.tar.gz/check_diskio.spec
^
|
@@ -1,4 +1,4 @@
-%define version 3.0.0
+%define version 3.0.1
%define release 0
%define name check_diskio
%define _prefix /usr/lib/nagios/plugins/contrib
@@ -37,6 +37,9 @@
%attr(0755, root, root) /usr/share/man/man3/%{name}.3pm.gz
%changelog
+* Fri May 15 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 3.0.1-0
+- embedded perl -> package variables
+
* Tue Jan 20 2009 Matteo Corti <matteo.corti@id.ethz.ch> - 3.0.0-0
- multiple devices and LVM
|