1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
diff --git a/bin/smokeinfo b/bin/smokeinfo
index 2b38b86..ff96674 100755
--- a/bin/smokeinfo
+++ b/bin/smokeinfo
@@ -2,8 +2,7 @@
use strict;
use warnings;
-use lib (split /:/, q{}); # PERL5LIB
-use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
+use lib qw(/usr/share/perl5);
use Smokeping::Info;
use Getopt::Long 2.25 qw(:config no_ignore_case);
diff --git a/bin/smokeping b/bin/smokeping
index 1dae42a..550beb5 100755
--- a/bin/smokeping
+++ b/bin/smokeping
@@ -4,13 +4,10 @@
use strict;
use warnings;
-use FindBin;
-use lib (split /:/, q{}); # PERL5LIB
-use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
-
+use lib qw(/usr/share/perl5);
use Smokeping;
-Smokeping::main("$FindBin::RealBin/../etc/config");
+Smokeping::main("/etc/smokeping/config");
=head1 NAME
diff --git a/bin/smokeping_cgi b/bin/smokeping_cgi
index 610118c..9a995c1 100755
--- a/bin/smokeping_cgi
+++ b/bin/smokeping_cgi
@@ -4,9 +4,7 @@
use strict;
use warnings;
-use FindBin;
-use lib (split /:/, q{}); # PERL5LIB
-use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
+use lib qw(/usr/share/perl5);
# don't bother with zombies
$SIG{CHLD} = 'IGNORE';
@@ -17,7 +15,7 @@ use Smokeping;
use CGI::Fast;
-my $cfg = (shift @ARGV) || "$FindBin::Bin/../etc/config";
+my $cfg = (shift @ARGV) || "/etc/smokeping/config";
while (my $q = new CGI::Fast) {
diff --git a/bin/tSmoke b/bin/tSmoke
index 6b56479..db9ef92 100755
--- a/bin/tSmoke
+++ b/bin/tSmoke
@@ -52,9 +52,7 @@ use warnings;
#
# Point the lib variables to your implementation
-use lib (split /:/, q{}); # PERL5LIB
-use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
-
+use lib qw(/usr/share/perl5);
use Smokeping;
use Net::SMTP;
@@ -63,7 +61,7 @@ use Pod::Usage;
use RRDs;
# Point to your Smokeping config file
-my $cfgfile = (shift @ARGV) || "$FindBin::Bin/../etc/config";
+my $cfgfile = "/etc/smokeping/config";
# global variables
my $cfg;
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 2209134..ab09330 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -31,5 +31,5 @@ MATCH := $(wildcard Smokeping/matchers/*.pm)
EXTRA_DIST = $(PM) $(SP) $(SORT) $(PROBE) $(MATCH)
-perllibdir = $(prefix)/lib
+perllibdir = $(prefix)/share/perl5
nobase_perllib_DATA = $(EXTRA_DIST)
|