summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/subst.in
diff options
context:
space:
mode:
authorEvgeni Golov <evgeni@golov.de>2014-02-26 07:38:46 (GMT)
committerJan Wagner <waja@cyconet.org>2014-02-27 19:58:49 (GMT)
commit2d49468a2533c4623d4121ee0e12260bcba78905 (patch)
treedc1abdd678f14194f5941ad2cf6505addf9a41bb /plugins-scripts/subst.in
parent9408c975fe199c4ef4d662dee05f4f684167b731 (diff)
downloadmonitoring-plugins-2d49468a2533c4623d4121ee0e12260bcba78905.tar.gz
subst.in: remove the led() function
It was only used to replace the 'use lib utils.pm' with the proper libexec dir, which is now solved by using Perl's FinBin. Closes #1241
Diffstat (limited to 'plugins-scripts/subst.in')
-rw-r--r--plugins-scripts/subst.in17
1 files changed, 0 insertions, 17 deletions
diff --git a/plugins-scripts/subst.in b/plugins-scripts/subst.in
index a70ad88..66777d7 100644
--- a/plugins-scripts/subst.in
+++ b/plugins-scripts/subst.in
@@ -19,19 +19,6 @@ function which(c,path) {
19 return c; 19 return c;
20} 20}
21 21
22# used to replace "use lib utils.pm" with "use lib @libexecdir"
23#
24function led() {
25 led1 = "@libexecdir@";
26 led2 = "@exec_prefix@";
27 led3 = "@prefix@";
28 if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
29 return "\"" led3 "/libexec\" " ;
30
31 }
32 return "\"" led1 "\"" ;
33}
34
35BEGIN { 22BEGIN {
36 split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/); 23 split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/);
37 24
@@ -58,10 +45,6 @@ BEGIN {
58 sub(c,which(c,path)); 45 sub(c,which(c,path));
59} 46}
60 47
61# add to libexecdir to INC for perl utils.pm
62/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
63
64
65# Trusted path mechanism (deprecated) 48# Trusted path mechanism (deprecated)
66 49
67/^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ { 50/^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ {