[Nagiosplug-devel] subst.in patch

Phil Dibowitz phil at ipom.com
Thu Aug 18 23:53:16 CEST 2005


I recently submitted a patch:

https://sourceforge.net/tracker/index.php?func=detail&aid=1262777&group_id=29880&atid=397599

which removes the which() function and the call to it from the
plugins-scripts/subst.in awk script.

The problem is that this function checks to see if $libexec exists
(where the plugins would go, and thus the utils.pm), and if it doesn't
it changes the "use lib" lines in the perl plugins to remove the base of
$libexec from the path (changes /usr/lib/nagios/plugins/ to
nagios/plugins).

But... it's checking for the existance of a directory and making a
decision based on it not being there even though
_it's_about_to_make_it_! That's silly.

The result is that... if you have a previous install, your 'use lib'
lines are good and nrpe can execute your plugins just fine.

But if it's a fresh install, your plugins get the relative paths which
mean that nrpe can't execute them at all, and nor can anything else that
doesn't run from within /usr/lib.

I can find no logical use for this function, and things are working well
for us with the patch...

Any reasons for this that I've missed?

-- 
Phil Dibowitz                             phil at ipom.com
Freeware and Technical Pages              Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
 - Benjamin Franklin, 1759

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://nagios-plugins.org/archive/devel/attachments/20050818/5e799190/attachment.sig>


More information about the Devel mailing list