Feature #1112: Fix exec_and_log functions

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

No files matched your search

+1 -1
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
}
+2 -3
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"