From ad1992955a47661b7861422f39a557a6bcfdf32b Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 11 Feb 2021 16:38:57 +1100 Subject: [PATCH] borg-backup: fix backup script failure match Fix a typo in the failure match, and log the error code in that case. Change-Id: Ie17042237986d0bed58e95c271f868c735c724d2 --- playbooks/roles/borg-backup/templates/borg-backup.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/borg-backup/templates/borg-backup.j2 b/playbooks/roles/borg-backup/templates/borg-backup.j2 index af9606e435..d645575135 100644 --- a/playbooks/roles/borg-backup/templates/borg-backup.j2 +++ b/playbooks/roles/borg-backup/templates/borg-backup.j2 @@ -47,8 +47,8 @@ do if [[ ${_status[0]} -ne 0 ]]; then info "Streaming script ${f} failed!" stream_exit=${_status[0]} - elif [[ ${_status[1]} -ne 1 ]]; then - info "Borg failed!" + elif [[ ${_status[1]} -ne 0 ]]; then + info "Borg failed (rc: ${_status[1]})!" stream_exit=${_status[1]} else stream_exit=0