Better error checking in the backup script.

* scripts/backup.in: Check exit code of MT_BEGIN
* scripts/backup.sh.in (backup_host): Return meaningful code
in case of remote execution.  See the comment, though.
This commit is contained in:
Sergey Poznyakoff
2016-11-12 12:31:24 +02:00
parent a2fd82f622
commit 76dad6d1fb
2 changed files with 10 additions and 5 deletions

View File

@@ -311,7 +311,9 @@ backup_host() {
CMD="exec ${TAR_PART1} -f \"${TAPE_FILE}\" $@"
message 10 "CMD: $CMD"
sh -c "$CMD"
message 10 "RC: $?"
RC=$?
message 10 "RC: $RC"
return $RC
fi
}