summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_rpc.pl
diff options
context:
space:
mode:
authorEvgeni Golov <evgeni@golov.de>2014-02-26 07:07:10 (GMT)
committerJan Wagner <waja@cyconet.org>2014-02-27 19:56:50 (GMT)
commit9408c975fe199c4ef4d662dee05f4f684167b731 (patch)
treef6c0cd753b6ed0ed61bd3f9731c718beb56a8e4d /plugins-scripts/check_rpc.pl
parentdd1848ef300964fc73bfd983de22b17419dbb54f (diff)
downloadmonitoring-plugins-9408c97.tar.gz
utils.pm: use FindBin instead of awk to find the path to
'use lib utils.pm' is not valid Perl syntax: Bareword "utils" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52. Bareword "pm" not allowed while "strict subs" in use at plugins-scripts/check_ircd.pl line 52. This makes it impossible to use the plugins directly from the git tree, e.g. while hacking on them. Using FindBin::Bin as the library path allows that, while preserving the original behaviour of adding the libexec path when the plugin is properly installed.
Diffstat (limited to 'plugins-scripts/check_rpc.pl')
-rwxr-xr-xplugins-scripts/check_rpc.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl
index 474067e..3a6f717 100755
--- a/plugins-scripts/check_rpc.pl
+++ b/plugins-scripts/check_rpc.pl
@@ -20,7 +20,8 @@
20# 20#
21 21
22use strict; 22use strict;
23use lib utils.pm; 23use FindBin;
24use lib "$FindBin::Bin";
24use utils qw($TIMEOUT %ERRORS &print_revision &support); 25use utils qw($TIMEOUT %ERRORS &print_revision &support);
25use vars qw($PROGNAME); 26use vars qw($PROGNAME);
26my ($verbose,@proto,%prognum,$host,$response,$prognum,$port,$cmd,$progver,$state); 27my ($verbose,@proto,%prognum,$host,$response,$prognum,$port,$cmd,$progver,$state);