#
#========================================================================
#
-# Version 2.1.0beta1, released 9 Apr 2004.
+# Version 2.1.0, released 20 Jun 2004.
#
# See http://backuppc.sourceforge.net.
#
#
sub UserCommandRun
{
- my($type) = @_;
+ my($cmdType) = @_;
- return if ( !defined($Conf{$type}) );
+ return if ( !defined($Conf{$cmdType}) );
my $vars = {
xfer => $xfer,
client => $client,
stat => \%stat,
xferOK => $stat{xferOK} || 0,
hostError => $stat{hostError},
- type => $type,
+ type => "restore",
bkupSrcHost => $RestoreReq{hostSrc},
bkupSrcShare => $RestoreReq{shareSrc},
bkupSrcNum => $RestoreReq{num},
pathHdrSrc => $RestoreReq{pathHdrSrc},
pathHdrDest => $RestoreReq{pathHdrDest},
fileList => $RestoreReq{fileList},
+ cmdType => $cmdType,
};
- my $cmd = $bpc->cmdVarSubstitute($Conf{$type}, $vars);
- $RestoreLOG->write(\"Executing $type: @$cmd\n");
+ my $cmd = $bpc->cmdVarSubstitute($Conf{$cmdType}, $vars);
+ $RestoreLOG->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