plugin_wrapper: Change return codes lt 0 or gt 3 to 3.

Else, Nagios will replace the plugin output with an hardcoded built-in value
to tell the user that the RC is out of range. However, when using the wrapper,
we're interested in the actual output.
This commit is contained in:
Sebastian Harl 2012-07-13 09:53:12 +02:00
parent 42f40c7c2b
commit 3b0fa1b3d4

5
plugin_wrapper.pl Executable file → Normal file
View file

@ -64,6 +64,11 @@ if ($p_rc == 255) {
my $p_output = join('', @p_output);
print $p_output;
if (($p_rc < 0) || ($p_rc > 3)) {
$p_rc = 3;
}
exit $p_rc;
sub exit_usage {