Bit shift right by 8 to get return code from exit status
[collectd.git] / contrib / exec-nagios.px
index c7f18c5..ec13b0a 100755 (executable)
@@ -442,7 +442,7 @@ sub execute_script
 
   close ($fh);
   # Save the exit status of the check in $state
-  $state = $?;
+  $state = $? >> 8;
 
   if ($state == 0)
   {