[Nagiosplug-devel] [ nagiosplug-Patches-2722832 ] awk subst.in/subst script path error

SourceForge.net noreply at sourceforge.net
Tue Mar 31 13:03:49 CEST 2009


Patches item #2722832, was opened at 2009-03-31 00:01
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2722832&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Martin Foster (martinfoster)
Assigned to: Thomas Guyot-Sionnest (dermoth)
Summary: awk subst.in/subst script path error

Initial Comment:
the plugins-scripts/subst.in awk script's last stage is to replace references to fully qualified commands with whatever is returned from the path subroutine.

This can trap the path derived by led() to update the  "use lib " statement at the top of scripts.  eg:
 use lib "/usr/lib/nagios/plugins";

gets updated to:
 use lib "nagios/plugins";

the second isn't valid.  I perceive the command line substitution as a cosmetic optimization, there's nothing wrong with calling commands explicitly.  They should be properly discovered by the configure stage for a given platform/distribution anyways.

patch knocks out the substitution.  May be more elegant ways to accomplish the same goal.


----------------------------------------------------------------------

>Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-03-31 07:03

Message:
Uhg sorry I might have been too wuick on the trigger.

Looks like this is a "automatic configuration" thingy - i.e. instead of
detecting commands in configure it does it at the make phase using this
script.

What it you move that up in the script, so that this substition happens
before the lib expansion?

A better way of doing it is making an explicit keyword in the paths, and
matching the keyword in that block. I.e. substituting "NP_AUTO_PATH/echo"
to the result of `which echo` That would require finding all paths modified
by running the said part of the script and comparing source plugins with
generated files.


----------------------------------------------------------------------

Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-03-31 06:52

Message:
Thanks for reporting this, though your patch is wrong. These substitutions
are required for non-standard paths.

What configure options did you use, so I can try to reproduce it?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2722832&group_id=29880




More information about the Devel mailing list