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:
parent
a48d204b3e
commit
dabcafa2d9
@ -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
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user