From 58a1764446e5a1a30db360ee7a69555d7f2e8f1a Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Tue, 9 Mar 2010 23:42:58 -0500 Subject: Fix nagios_die wrapper not properly passing last argument to nagios_exit nagios_die() accepts many ways of specifying arguments. One of them is passing the message only, in which case the last argument added by Plugins.pm is on the 2nd position instead of the 3rd. One visible effect of this bug is the inability to print custom "shortname" with nagios_die when the exit code is not specified. diff --git a/lib/Nagios/Plugin/Functions.pm b/lib/Nagios/Plugin/Functions.pm index 9a8272a..4ff6118 100644 --- a/lib/Nagios/Plugin/Functions.pm +++ b/lib/Nagios/Plugin/Functions.pm @@ -173,7 +173,7 @@ sub nagios_die { # Else just assume $arg1 is the message and hope for the best else { - return nagios_exit( UNKNOWN, $arg1, $rest ); + return nagios_exit( UNKNOWN, $arg1, $arg2 ); } } -- cgit v0.10-9-g596f