mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
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
This commit is contained in:
parent
9408c975fe
commit
2d49468a25
1 changed files with 0 additions and 17 deletions
|
|
@ -19,19 +19,6 @@ function which(c,path) {
|
|||
return c;
|
||||
}
|
||||
|
||||
# used to replace "use lib utils.pm" with "use lib @libexecdir"
|
||||
#
|
||||
function led() {
|
||||
led1 = "@libexecdir@";
|
||||
led2 = "@exec_prefix@";
|
||||
led3 = "@prefix@";
|
||||
if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
|
||||
return "\"" led3 "/libexec\" " ;
|
||||
|
||||
}
|
||||
return "\"" led1 "\"" ;
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/);
|
||||
|
||||
|
|
@ -58,10 +45,6 @@ BEGIN {
|
|||
sub(c,which(c,path));
|
||||
}
|
||||
|
||||
# add to libexecdir to INC for perl utils.pm
|
||||
/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
|
||||
|
||||
|
||||
# Trusted path mechanism (deprecated)
|
||||
|
||||
/^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ {
|
||||
|
|
|
|||
Loading…
Reference in a new issue