[Nagiosplug-devel] Negate patch

Ton Voon ton.voon at altinity.com
Sat Sep 22 01:17:18 CEST 2007


Hi!

Just to let you know I've committed a patch to negate by my  
colleague, Duncan Ferguson.

Basically, negate was causing problems when matched with check_nrpe  
because it was evaluating its arguments like a shell twice.

Old negate:

./negate $PWD/check_dummy 0 "a space separated value"
OK: a

New negate:

./negate $PWD/check_dummy 0 "a space separated value"
OK: a space separated value

I think this also helps with some of the reported problems combining  
check_http with negate.

This works like the time command does now by considering the input  
parameters as an array and passing this array to execve. Also, the  
runcmd.c file has been re-implemented as a utils_cmd.c file so that  
we can run libtap tests against it.

There's a warning though: existing negate commands might not work  
properly. Also, we enforce the full path to find the command to execute.

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon







More information about the Devel mailing list