aboutsummaryrefslogtreecommitdiff
path: root/plugins-scripts/check_disk_smb.pl
diff options
context:
space:
mode:
authorGravatar Evgeni Golov <evgeni@golov.de> 2014-02-26 08:07:10 +0100
committerGravatar Jan Wagner <waja@cyconet.org> 2014-02-27 20:56:50 +0100
commit9408c975fe199c4ef4d662dee05f4f684167b731 (patch)
treef6c0cd753b6ed0ed61bd3f9731c718beb56a8e4d /plugins-scripts/check_disk_smb.pl
parentdd1848ef300964fc73bfd983de22b17419dbb54f (diff)
downloadmonitoring-plugins-9408c975fe199c4ef4d662dee05f4f684167b731.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_disk_smb.pl')
-rwxr-xr-xplugins-scripts/check_disk_smb.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl
index 8b6cd2eb..b0a61144 100755
--- a/plugins-scripts/check_disk_smb.pl
+++ b/plugins-scripts/check_disk_smb.pl
@@ -24,7 +24,8 @@ use strict;
use Getopt::Long;
use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose);
use vars qw($PROGNAME);
-use lib utils.pm ;
+use FindBin;
+use lib "$FindBin::Bin";
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
sub print_help ();