1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

bug: wrong access to exitstatus

(cherry picked from commit 1aad41ffe6990fad4f7a57d2291cb92d888216fb)
This commit is contained in:
Ruben S. Montero 2011-09-16 12:09:37 +02:00
parent c6a8c1fbdc
commit d582636e47

View File

@ -53,7 +53,8 @@ module OpenNebula
# the command fails
def self.exec_and_log(command, message=nil)
output=`#{command} 2>&1 1>/dev/null`
code=$?
code=$?.exitstatus
if code!=0
log_error "Command \"#{command}\" failed."
log_error output