File: fix-paths-inside-executables

package info (click to toggle)
smokeping 2.8.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,348 kB
  • sloc: perl: 17,637; sh: 3,884; makefile: 156; javascript: 114
file content (173 lines) | stat: -rw-r--r-- 5,092 bytes parent folder | download
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
Description: hardcode the path to the config file in CGI
Author: Antoine Beaupré <anarcat@debian.org>
Forwarded: not-needed
Last-Update: 2019-02-16

Index: b/bin/smokeping_cgi
===================================================================
--- a/bin/smokeping_cgi	2018-05-12 17:02:02.090910241 -0400
+++ b/bin/smokeping_cgi	2018-05-12 17:05:36.224389954 -0400
@@ -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
 
 # 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) {
Index: b/bin/smokeping
===================================================================
--- a/bin/smokeping	2018-05-12 17:04:04.175753876 -0400
+++ b/bin/smokeping	2018-05-12 17:05:08.868200917 -0400
@@ -4,13 +4,11 @@
 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 Smokeping;
- 
-Smokeping::main("$FindBin::RealBin/../etc/config");
+
+Smokeping::main("/etc/smokeping/config");
 
 =head1 NAME
 
@@ -128,25 +126,6 @@ L<documentation on the SmokePing configuration file|smokeping_config>.
 
 Please refer to L<the installation document|smokeping_install> for detailed setup instructions.
 
-=head1 SETUP
-
-When installing SmokePing, this file has to be adjusted to fit your
-local system. Three paths have to be entered.
-
-One pointing to your B<rrdtool> installation
-
- use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
-
-One pointing to the place where you have installed the SmokePing libraries
-
- use lib qw(/home/oetiker/public_html/smokeping/lib);
-
-The third path is the argument to the Smokeping::main command. It points to
-the SmokePing configuration file.
-
- use Smokeping;
- Smokeping::main("/home/oetiker/.smokeping/config");
-
 =head1 SEE ALSO
 
 L<smokeping_config(5)>, L<smokeping_examples(5)>, L<smokeping_cgi(1)>,
Index: b/bin/tSmoke
===================================================================
--- a/bin/tSmoke	2018-05-12 17:04:04.175753876 -0400
+++ b/bin/tSmoke	2018-05-12 17:06:18.924685024 -0400
@@ -53,7 +53,6 @@ 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 Smokeping;
@@ -63,7 +62,7 @@ use Pod::Usage;
 use RRDs;
 
 # Point to your Smokeping config file
-my $cfgfile = (shift @ARGV) || "$FindBin::Bin/../etc/config";
+my $cfgfile = (shift @ARGV) || "/etc/smokeping/config";
 
 # global variables
 my $cfg;
@@ -498,39 +497,9 @@ past week and past month including an overview.
 Typical crontab used to invoke this are
 
  # Quick morning alert to see what's down
- 0 6 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mobilephone@att.net.invalid --morning
+ 0 6 * * * /usr/sbin/tSmoke --q --to=mobilephone@att.net.invalid --morning
  # Weekly report on the percent availability of network systems with no detail
- 0 8 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mailbox@company.com.invalid --weekly --detail=0
-
-=head1 SETUP
-
-When installing tSmoke, some variables must be adjusted to fit your local system.
-
-We need to use the following B<libraries>:
-
-=over
-
-=item Smokeping
-
-=item RRDTool Perl bindings
-
-=item Getopt::Long
-
-=back
-
-Set up your libraries:
-
- use lib "/usr/local/smokeping/lib";
- use lib "/usr/local/rrdtool-1.0.39/lib/perl";
-
-Point to your Smokeping B<config> file
-
- my $cfgfile = "/usr/local/smokeping/etc/config";
-
-Modify the Smokeping config file to include a path for tmail in the
-General section:
-
- tmail = /usr/local/smokeping/etc/tmail
+ 0 8 * * * /usr/sbin/tSmoke --q --to=mailbox@company.com.invalid --weekly --detail=0
 
 =head1 SEE ALSO
 
diff --git a/bin/smokeinfo b/bin/smokeinfo
index 7c56c0f..83a346e 100755
--- a/bin/smokeinfo
+++ b/bin/smokeinfo
@@ -3,7 +3,6 @@ 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 Smokeping::Info;
 use Getopt::Long 2.25 qw(:config no_ignore_case);
@@ -82,19 +81,19 @@ they work on the same syntax.
 
 Get all data all nodes
 
- smokeinfo etc/config 
+ smokeinfo /etc/smokeping/config
 
 Only show nodes directly under /Customers
 
- smokeinfo --filter=/Customers/ etc/config
+ smokeinfo --filter=/Customers/ /etc/smokeping/config
 
 Show all nodes under /Customers
 
- smokeinfo --mode=recursive --filter=/Customers/ etc/config
+ smokeinfo --mode=recursive --filter=/Customers/ /etc/smokeping/config
 
 Show all nodes with '_wlan_' in the name
 
- smokeinfo --mode=regexp --filter=_wlan_ etc/config
+ smokeinfo --mode=regexp --filter=_wlan_ /etc/smokeping/config
 
 =head1 SEE ALSO