[Nagiosplug-devel] All Perl plugins broken with --libexec=SOME_PATH

Thomas Guyot-Sionnest Thomas at zango.com
Tue Nov 21 00:00:09 CET 2006

I compiled the latest nagios-plugins with ./configure --prefix=/usr

All Perl plugins were broken because the utils.pm path were set to the last
component of --libexecdir, 'nagios'.

I fixed it by changing this in plugins-scripts/subst.in:

function led() {
        led1 = "@libexecdir@";
        led2 = "@exec_prefix@";
        led3 = "@prefix@";
        if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
                return "\"" led3 "/libexec\" " ;

        return "\"" led1 "\"" ;


function led() {
        led1 = "@libexecdir@";
        return "\"" led1 "\"" ;

I don't know what's the heck with all the other stuff in that function but
afaik utils.pm is in @libexecdir@ so I don't get why just returning
@libexecdir@ isn't suficient.

Also, in check_mailq, the path is unset but qmail-qstat requires a path set
for the following binaries: cd, echo, wc, find and expr.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3076 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20061120/edc4a97d/attachment.bin>

More information about the Devel mailing list