From 714522febc688863012fc71149dcda4a36214e9e Mon Sep 17 00:00:00 2001 From: Scott Sanders Date: Fri, 19 Sep 2014 10:31:18 -0400 Subject: [PATCH] Bit shift right by 8 to get return code from exit status Pull-Request: #741 Signed-off-by: Florian Forster --- contrib/exec-nagios.px | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/exec-nagios.px b/contrib/exec-nagios.px index c7f18c58..ec13b0a0 100755 --- a/contrib/exec-nagios.px +++ b/contrib/exec-nagios.px @@ -442,7 +442,7 @@ sub execute_script close ($fh); # Save the exit status of the check in $state - $state = $?; + $state = $? >> 8; if ($state == 0) { -- 2.30.2