[Nagiosplug-checkins] CVS: nagiosplug/plugins-scripts subst.in,1.1.1.1,1.2
Subhendu Ghosh
sghosh at users.sourceforge.net
Sun Mar 17 21:16:02 CET 2002
Update of /cvsroot/nagiosplug/nagiosplug/plugins-scripts
In directory usw-pr-cvs1:/tmp/cvs-serv19036
Modified Files:
subst.in
Log Message:
function to update perl plugin scripts to find utils.pm
Index: subst.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/subst.in,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** subst.in 28 Feb 2002 06:43:00 -0000 1.1.1.1
--- subst.in 18 Mar 2002 05:15:04 -0000 1.2
***************
*** 20,25 ****
--- 20,39 ----
}
+ # 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,/:/);
+
}
***************
*** 30,33 ****
--- 44,51 ----
/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
+
+ # add to libexecdir to INC for perl utils.pm
+ /^use/ { if (/lib/) { if (/utils.pm/ ) {sub(/utils.pm/,led() )} } }
+
# Trusted path mechanism (deprecated)
More information about the Commits
mailing list