Module: monitoring-plugins Branch: master Commit: ae24aaeefba290d910a8d8f945716ecc84ca02ca Author: Holger Weiss <[email protected]> Date: Wed Jun 18 18:45:10 2014 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ae24aae
Use FindBin consistently across Perl plugins Use Perl's FindBin module to locate the path to utils.pm in check_file_age.pl and check_mssql.pl, just as we do in other Perl plugins. --- plugins-scripts/check_file_age.pl | 3 ++- plugins-scripts/check_mssql.pl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins-scripts/check_file_age.pl b/plugins-scripts/check_file_age.pl index 5e062de..ae25201 100755 --- a/plugins-scripts/check_file_age.pl +++ b/plugins-scripts/check_file_age.pl @@ -25,7 +25,8 @@ use English; use Getopt::Long; use File::stat; use vars qw($PROGNAME); -use lib "."; +use FindBin; +use lib "$FindBin::Bin"; use utils qw (%ERRORS &print_revision &support); sub print_help (); diff --git a/plugins-scripts/check_mssql.pl b/plugins-scripts/check_mssql.pl index a3f497c..a436a8f 100755 --- a/plugins-scripts/check_mssql.pl +++ b/plugins-scripts/check_mssql.pl @@ -29,7 +29,8 @@ use DBI; use DBD::Sybase; use Getopt::Long; -use lib "."; +use FindBin; +use lib "$FindBin::Bin"; use utils qw($TIMEOUT %ERRORS &print_revision &support); use strict;
