X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_dump;h=cc633f9b868b5192f1618eee4a665f5b1751c458;hp=9dfd6c1d603bc673d6e4af07047a2fa3cab33d7d;hb=488bb662f6d144d42376b3d14e9b1e438e00e6f8;hpb=ca593f66fd6c35764bd8997c6338b781330f019c diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump index 9dfd6c1..cc633f9 100755 --- a/bin/BackupPC_dump +++ b/bin/BackupPC_dump @@ -77,7 +77,7 @@ # #======================================================================== # -# Version 3.2.0beta0, released 5 April 2009. +# Version 3.2.0, released 31 Jul 2010. # # See http://backuppc.sourceforge.net. # @@ -623,6 +623,7 @@ $NeedPostCmd = 1; # # Now backup each of the shares # +my $shareDuplicate = {}; for my $shareName ( @$ShareNames ) { local(*RH, *WH); @@ -632,11 +633,17 @@ for my $shareName ( @$ShareNames ) { $shareName = encode("utf8", $shareName); $stat{xferOK} = $stat{hostAbort} = undef; $stat{hostError} = $stat{lastOutputLine} = undef; - if ( -d "$Dir/new/$shareName" ) { + if ( $shareName eq "" ) { + print(LOG $bpc->timeStamp, + "unexpected empty share name skipped\n"); + next; + } + if ( $shareDuplicate->{$shareName} ) { print(LOG $bpc->timeStamp, "unexpected repeated share name $shareName skipped\n"); next; } + $shareDuplicate->{$shareName} = 1; UserCommandRun("DumpPreShareCmd", $shareName); if ( $? && $Conf{UserCmdCheckStatus} ) { @@ -915,6 +922,10 @@ for my $shareName ( @$ShareNames ) { # last; } + # + # Wait for any child processes to exit + # + # 1 while ( wait() >= 0 ); } # @@ -1006,6 +1017,8 @@ print(LOG $bpc->timeStamp, BackupExpire($client); +UserCommandRun("DumpPostFinishCmd"); # XXX ASA search integration + print("$type backup complete\n"); ###########################################################################