From 6ae85d5afd6d25d60dd50f59ddff4a83b409b85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 23 Feb 2021 10:05:50 +0000 Subject: [PATCH] fix: osh-backup-acl-keys: detect file removed transient error --- bin/cron/osh-backup-acl-keys.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cron/osh-backup-acl-keys.sh b/bin/cron/osh-backup-acl-keys.sh index c572f8f..6a7ee8f 100755 --- a/bin/cron/osh-backup-acl-keys.sh +++ b/bin/cron/osh-backup-acl-keys.sh @@ -96,8 +96,8 @@ do rm -f "$tarstderr" break else - # special case: if a file changed while we were reading it, tar fails, in that case: retry - if [ $ret -eq 1 ] && grep -q 'file changed as we read it' "$tarstderr"; then + # special case: if a file changed/removed while we were reading it, tar fails, in that case: retry + if [ $ret -eq 1 ] && grep -q -e 'changed as we read it' -e 'removed before we read it' "$tarstderr"; then _log "Transient tar failure (try $try):" while read -r line; do _log "tar: $line"