diff --git a/kvm-backup-images.sh b/kvm-backup-images.sh index bb28665..cf7c5cc 100644 --- a/kvm-backup-images.sh +++ b/kvm-backup-images.sh @@ -108,7 +108,7 @@ while read -r line; do IMAGES+=("$IMAGE") done < <( virsh domblklist $DOMAIN | tail -n +3 - echo $? >$BLKLIST_STATUS_TMP + echo ${PIPESTATUS[0]} >$BLKLIST_STATUS_TMP ) # Get status from the block listing. @@ -222,7 +222,7 @@ while read -r line; do fi done < <( virsh list --all | tail -n +3 - echo $? >$DOMLIST_STATUS_TMP + echo ${PIPESTATUS[0]} >$DOMLIST_STATUS_TMP ) # Get status from the domain listing.