#
#========================================================================
#
-# Version 2.1.0beta2, released 23 May 2004.
+# Version 2.1.0, released 20 Jun 2004.
#
# See http://backuppc.sourceforge.net.
#
#
my $fullKeepCnt = $Conf{FullKeepCnt};
$fullKeepCnt = [$fullKeepCnt] if ( ref($fullKeepCnt) ne "ARRAY" );
- my $oldestFull;
+ my $fullAgeMax;
my $fullPeriod = int(0.5 + $Conf{FullPeriod});
for ( my $i = 0 ; $i < @$fullKeepCnt ; $i++ ) {
- $oldestFull += $fullKeepCnt->[$i] * $fullPeriod;
+ $fullAgeMax += $fullKeepCnt->[$i] * $fullPeriod;
$fullPeriod *= 2;
}
- $oldestFull += $fullPeriod; # add some buffer
+ $fullAgeMax += $fullPeriod; # add some buffer
if ( $cntFull > $Conf{FullKeepCntMin}
&& $oldestFull > $Conf{FullAgeMax}
- && $oldestFull > $oldestFull
+ && $oldestFull > $fullAgeMax
&& $Conf{FullKeepCntMin} > 0
&& $Conf{FullAgeMax} > 0
&& (@Backups <= $firstFull + 1
#
sub UserCommandRun
{
- my($type) = @_;
+ my($cmdType) = @_;
- return if ( !defined($Conf{$type}) );
+ return if ( !defined($Conf{$cmdType}) );
my $vars = {
xfer => $xfer,
client => $client,
xferOK => $stat{xferOK} || 0,
hostError => $stat{hostError},
type => $type,
+ cmdType => $cmdType,
};
- my $cmd = $bpc->cmdVarSubstitute($Conf{$type}, $vars);
- $XferLOG->write(\"Executing $type: @$cmd\n");
+ my $cmd = $bpc->cmdVarSubstitute($Conf{$cmdType}, $vars);
+ $XferLOG->write(\"Executing $cmdType: @$cmd\n");
#
# Run the user's command, dumping the stdout/stderr into the
# Xfer log file. Also supply the optional $vars and %Conf in