summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins-scripts/subst.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins-scripts/subst.in b/plugins-scripts/subst.in
index cc0fd1b6..9140157b 100644
--- a/plugins-scripts/subst.in
+++ b/plugins-scripts/subst.in
@@ -19,8 +19,22 @@ 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
22BEGIN { 35BEGIN {
23 split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/); 36 split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/);
37
24} 38}
25 39
26# scripting language (first line) 40# scripting language (first line)
@@ -30,6 +44,10 @@ BEGIN {
30/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");} 44/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
31/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");} 45/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
32 46
47# add to libexecdir to INC for perl utils.pm
48/^use/ { if (/lib/) { if (/utils.pm/ ) {sub(/utils.pm/,led() )} } }
49
50
33# Trusted path mechanism (deprecated) 51# Trusted path mechanism (deprecated)
34 52
35/^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ { 53/^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ {