B #4781: Rollback for ssh, shared and qcow2

This commit is contained in:
Jaime Melis committed 2016-10-06 17:11:52 +02:00
1 parent 9d90f12602
commit ab9dfbcb51
2 files changed
+11 -4

No files matched your search

+3 -3
View File
@@ -359,10 +359,10 @@ EOF`
function ssh_exec_and_log
{
ssh_exec_and_log_no_error "$@"
rc=$?
EXEC_RC=$?
if [ $rc !=0 ]; then
exit $rc
if [ "$EXEC_RC" != "0" ]; then
exit $EXEC_RC
fi
}
+8 -1
View File
@@ -54,9 +54,16 @@ ssh_make_path $DST_HOST $DST_DIR
MKFS_CMD=`mkfs_command $DST_PATH $FSTYPE $SIZE`
MKSCRIPT=$(cat <<EOF
set -e -o pipefail
export PATH=/usr/sbin:/sbin:\$PATH
$MKFS_CMD
rc=\$?
if [ "\$rc" != "0" ]; then
rm -f $DST_PATH
fi
exit \$rc
EOF
)