mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-09 20:32:38 +01:00
borg: emit warning if rc=1, fixes #11311
This commit is contained in:
parent
387eb85d70
commit
e1b4a823d3
@ -175,9 +175,13 @@ debug "$nice $execstr"
|
||||
|
||||
if [ $test = 0 ]; then
|
||||
output=`$nice su -c "$execstr" 2>&1`
|
||||
if [ $? = 0 ]; then
|
||||
ret=$?
|
||||
if [ $ret = 0 ]; then
|
||||
debug $output
|
||||
info "Successfully finished backing up source."
|
||||
elif [ $ret = 1 ]; then
|
||||
warning "Backing up source finished with warnings, details below."
|
||||
warning $output
|
||||
else
|
||||
error $output
|
||||
fatal "Failed backing up source."
|
||||
@ -196,12 +200,16 @@ if [ "$prune" == "yes" ]; then
|
||||
debug "$prunestr"
|
||||
if [ $test = 0 ]; then
|
||||
output="`su -c "$prunestr" 2>&1`"
|
||||
if [ $? = 0 ]; then
|
||||
ret=$?
|
||||
if [ $ret = 0 ]; then
|
||||
debug $output
|
||||
info "Removing old backups succeeded."
|
||||
else
|
||||
elif [ $ret = 1 ]; then
|
||||
warning "Removing old backups finished with warnings, details below."
|
||||
warning $output
|
||||
warning "Failed removing old backups."
|
||||
else
|
||||
error $output
|
||||
fatal "Failed removing old backups."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user