Don't rely on FindBin module to locate utils.pm

As the FindBin module doesn't work with ePN, set the path to utils.pm
explicitly at build time.  Keep using FindBin additionally, so that the
plugins can also be executed from the build directory.

Closes #1271.
This commit is contained in:
Holger Weiss 2014-07-06 19:55:03 +02:00
parent ba21e26443
commit 1f4fd12845
13 changed files with 14 additions and 1 deletions

View file

@ -26,7 +26,8 @@ EXTRA_DIST=check_breeze.pl check_disk_smb.pl check_flexlm.pl check_ircd.pl \
EDIT = sed \
-e 's|[@]NP_VERSION[@]|$(NP_VERSION)|g' \
-e 's|[@]TRUSTED_PATH[@]|$(with_trusted_path)|g' \
-e 's|[@]PERL[@]|$(PERL)|g'
-e 's|[@]PERL[@]|$(PERL)|g' \
-e 's|[@]libexecdir[@]|$(libexecdir)|g'
TESTS_ENVIRONMENT=perl -I $(top_builddir) -I $(top_srcdir)

View file

@ -6,6 +6,7 @@ use Getopt::Long;
use vars qw($opt_V $opt_h $opt_w $opt_c $opt_H $opt_C $PROGNAME);
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw(%ERRORS &print_revision &support &usage);
$PROGNAME = "check_breeze";

View file

@ -26,6 +26,7 @@ use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_
use vars qw($PROGNAME);
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
sub print_help ();

View file

@ -27,6 +27,7 @@ use File::stat;
use vars qw($PROGNAME);
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw (%ERRORS &print_revision &support);
sub print_help ();

View file

@ -37,6 +37,7 @@ use Getopt::Long;
use vars qw($opt_V $opt_h $opt_F $opt_t $verbose $PROGNAME);
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw(%ERRORS &print_revision &support &usage);
$PROGNAME="check_flexlm";

View file

@ -37,6 +37,7 @@ use POSIX;
use strict;
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use Net::SNMP;

View file

@ -34,6 +34,7 @@ use POSIX;
use strict;
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use Net::SNMP;

View file

@ -51,6 +51,7 @@ use vars qw($opt_V $opt_h $opt_t $opt_p $opt_H $opt_w $opt_c $verbose);
use vars qw($PROGNAME);
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
# ----------------------------------------------------[ Function Prototypes ]--

View file

@ -33,6 +33,7 @@ use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t
%srcdomains %dstdomains);
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw(%ERRORS &print_revision &support &usage );

View file

@ -31,6 +31,7 @@ use DBD::Sybase;
use Getopt::Long;
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use strict;

View file

@ -29,6 +29,7 @@ use Getopt::Long;
use Net::DNS;
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils ;
my $PROGNAME = "check_netdns";

View file

@ -22,6 +22,7 @@
use strict;
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use vars qw($PROGNAME);
my ($verbose,@proto,%prognum,$host,$response,$prognum,$port,$cmd,$progver,$state);

View file

@ -5,6 +5,7 @@
use strict;
use FindBin;
use lib "$FindBin::Bin";
use lib '@libexecdir@';
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use vars qw($PROGNAME);
use Getopt::Long;