[Nagiosplug-checkins] SF.net SVN: nagiosplug:[2196] nagiosplug/trunk
dermoth at users.sourceforge.net
dermoth at users.sourceforge.net
Wed May 20 06:44:12 CEST 2009
Revision: 2196
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2196&view=rev
Author: dermoth
Date: 2009-05-20 04:44:12 +0000 (Wed, 20 May 2009)
Log Message:
-----------
Fix awk subst.in/subst script path error (#2722832 - Martin Foster)
From: Thomas Guyot-Sionnest <dermoth at aei.ca>
Modified Paths:
--------------
nagiosplug/trunk/NEWS
nagiosplug/trunk/THANKS.in
nagiosplug/trunk/plugins-scripts/subst.in
Modified: nagiosplug/trunk/NEWS
===================================================================
--- nagiosplug/trunk/NEWS 2009-05-20 04:21:16 UTC (rev 2195)
+++ nagiosplug/trunk/NEWS 2009-05-20 04:44:12 UTC (rev 2196)
@@ -33,6 +33,7 @@
check_nt can return UNKNOWN on timeouts (-u)
Fixed typos for check_disk (Chris Pepper)
Fixed check_mysql* not using password set in my.cnf (#2531905 - Ben Timby) - Specify an empty password explicitly if you need to override it.
+ Fixed awk subst.in/subst script path error (#2722832 - Martin Foster)
1.4.13 25th Sept 2008
Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
Modified: nagiosplug/trunk/THANKS.in
===================================================================
--- nagiosplug/trunk/THANKS.in 2009-05-20 04:21:16 UTC (rev 2195)
+++ nagiosplug/trunk/THANKS.in 2009-05-20 04:44:12 UTC (rev 2196)
@@ -251,3 +251,4 @@
Oskar Ahner
Chris Pepper
Ben Timby
+Martin Foster
Modified: nagiosplug/trunk/plugins-scripts/subst.in
===================================================================
--- nagiosplug/trunk/plugins-scripts/subst.in 2009-05-20 04:21:16 UTC (rev 2195)
+++ nagiosplug/trunk/plugins-scripts/subst.in 2009-05-20 04:44:12 UTC (rev 2196)
@@ -47,6 +47,17 @@
/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
+# If a script contains a reference to a fully qualified command,
+# subst will replace the fully qualified command with whatever is
+# returned from the which subroutine. run before changes to INC to add libexecdir
+# FIXME: Prepend executables with a substitution keyword instead.
+#
+/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
+ match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
+ c=substr($0,RSTART,RLENGTH);
+ sub(c,which(c,path));
+}
+
# add to libexecdir to INC for perl utils.pm
/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
@@ -61,16 +72,6 @@
sub(/\=.*$/,"='@with_trusted_path@' # autoconf-derived");
}
-# If a script contains a reference to a fully qualified command,
-# subst will replace the fully qualified command with whatever is
-# returned from the which subroutine
-#
-/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
- c=substr($0,RSTART,RLENGTH);
- sub(c,which(c,path));
-}
-
{
print;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list