projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed some typos.
[BackupPC.git]
/
bin
/
BackupPC_archive
diff --git
a/bin/BackupPC_archive
b/bin/BackupPC_archive
index
e9ed33b
..
e1e9900
100644
(file)
--- a/
bin/BackupPC_archive
+++ b/
bin/BackupPC_archive
@@
-157,6
+157,10
@@
local(*RH, *WH);
# Run an optional pre-archive command
#
UserCommandRun("ArchivePreUserCmd");
# Run an optional pre-archive command
#
UserCommandRun("ArchivePreUserCmd");
+if ( $? && $Conf{UserCmdCheckStatus} ) {
+ $stat{hostError} = "ArchivePreUserCmd returned error status $?";
+ exit(ArchiveCleanup($client));
+}
$NeedPostCmd = 1;
$xfer = BackupPC::Xfer::Archive->new($bpc);
$NeedPostCmd = 1;
$xfer = BackupPC::Xfer::Archive->new($bpc);
@@
-271,7
+275,13
@@
sub ArchiveCleanup
#
# Run an optional post-archive command
#
#
# Run an optional post-archive command
#
- UserCommandRun("ArchivePostUserCmd") if ( $NeedPostCmd );
+ if ( $NeedPostCmd ) {
+ UserCommandRun("ArchivePostUserCmd");
+ if ( $? && $Conf{UserCmdCheckStatus} ) {
+ $stat{hostError} = "RestorePreUserCmd returned error status $?";
+ $stat{xferOK} = 0;
+ }
+ }
rename("$Dir/ArchiveLOG$fileExt", "$Dir/ArchiveLOG.$lastNum$fileExt");
rename("$Dir/$reqFileName", "$Dir/ArchiveInfo.$lastNum");
rename("$Dir/ArchiveLOG$fileExt", "$Dir/ArchiveLOG.$lastNum$fileExt");
rename("$Dir/$reqFileName", "$Dir/ArchiveInfo.$lastNum");