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

Feature #1112: Fix exec_and_log functions

This commit is contained in:
Carlos Martín 2012-03-06 18:07:14 +01:00
parent a48d204b3e
commit dabcafa2d9
2 changed files with 3 additions and 4 deletions

View File

@ -121,7 +121,7 @@ function exec_and_log
else
error_message "Error executing $1: $EXEC_LOG_ERR"
fi
exit $code
exit $EXEC_LOG_RC
fi
}

View File

@ -88,9 +88,8 @@ $2
EOF`
SSH_EXEC_RC=$?
if [ $? -ne 0 ]; then
log_error "Command $2 failed"
log_error "$SSH_EXEC_ERR"
if [ $SSH_EXEC_RC -ne 0 ]; then
log_error "Command \"$2\" failed: $SSH_EXEC_ERR"
if [ -n "$3" ]; then
error_message "$3"