X-Git-Url: http://git.rot13.org//?a=blobdiff_plain;f=bin%2FBackupPC_archive;h=c61e5cfb36008837c8a18000293f91afc2c141be;hb=2c14784ad71874ec850d189060fe63d6eb9eba95;hp=3a3bea42c8d9a66e9dba7a42454bfef38ffc9043;hpb=72b87b178ae8dcc10f1ae0f441d13e30d5f1ecf1;p=BackupPC.git diff --git a/bin/BackupPC_archive b/bin/BackupPC_archive index 3a3bea4..c61e5cf 100644 --- a/bin/BackupPC_archive +++ b/bin/BackupPC_archive @@ -1,4 +1,4 @@ -#!/bin/perl -T +#!/bin/perl #============================================================= -*-perl-*- # # BackupPC_archive: Archive files for an archive client. @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0_CVS, released 3 Jul 2003. +# Version 2.1.0_CVS, released 8 Feb 2004. # # See http://backuppc.sourceforge.net. # @@ -72,8 +72,6 @@ $reqFileName = $1; my $startTime = time(); -#my $Hosts = $bpc->HostInfoRead($client); - my $Dir = "$TopDir/pc/$client"; my @xferPid = (); @@ -113,6 +111,7 @@ if ( !(my $ret = do "$Dir/$reqFileName") ) { $stat{hostError} = $err; exit(ArchiveCleanup($client)); } + # # Re-read config file, so we can include the PC-specific config # @@ -191,7 +190,9 @@ if ( !defined($logMsg = $xfer->start()) ) { } print(LOG $bpc->timeStamp, "Starting archive\n"); +print("started_archive\n"); $xfer->run(); +$stat{xferOK} = 0 if ( defined($stat{hostError} = $xfer->errStr) ); alarm(0); exit(ArchiveCleanup($client)); @@ -277,7 +278,7 @@ sub ArchiveCleanup $stat{hostError} = $stat{lastOutputLine} if ( $stat{hostError} eq "" ); sleep(2); $stat{hostAbort} = 1; - $ArchiveLOG->write(\"Archive failed: $stat{hostError}\n") + $ArchiveLOG->write(\"Archive failed: $stat{hostError}") if ( defined($ArchiveLOG) ); } @@ -309,7 +310,7 @@ sub ArchiveCleanup return 1; } else { print(LOG $bpc->timeStamp, "Archive Complete\n"); - print("Archive Complete\n"); + print("archive complete\n"); return; } }