Merge "borg-backup: save PIPESTATUS before referencing"
This commit is contained in:
commit
8d127946bc
@ -43,12 +43,13 @@ do
|
||||
bash $f | ${BORG_CREATE} --stdin-name ${stream_name} \
|
||||
::"{hostname}-${stream_name}-{now}" -
|
||||
|
||||
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
|
||||
_status=( "${PIPESTATUS[@]}" )
|
||||
if [[ ${_status[0]} -ne 0 ]]; then
|
||||
info "Streaming script ${f} failed!"
|
||||
stream_exit=${PIPESTATUS[0]}
|
||||
elif [[ ${PIPESTATUS[1]} -ne 1 ]]; then
|
||||
stream_exit=${_status[0]}
|
||||
elif [[ ${_status[1]} -ne 1 ]]; then
|
||||
info "Borg failed!"
|
||||
stream_exit=${PIPESTATUS[1]}
|
||||
stream_exit=${_status[1]}
|
||||
else
|
||||
stream_exit=0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user