* Commit for 2.1.0.
[BackupPC.git] / bin / BackupPC_restore
index 5843a01..5389e7d 100755 (executable)
@@ -29,7 +29,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0beta2, released 23 May 2004.
+# Version 2.1.0, released 20 Jun 2004.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -611,9 +611,9 @@ sub pidHandler
 #
 sub UserCommandRun
 {
-    my($type) = @_;
+    my($cmdType) = @_;
 
-    return if ( !defined($Conf{$type}) );
+    return if ( !defined($Conf{$cmdType}) );
     my $vars = {
         xfer         => $xfer,
         client       => $client,
@@ -629,7 +629,7 @@ sub UserCommandRun
         stat         => \%stat,
         xferOK       => $stat{xferOK} || 0,
        hostError    => $stat{hostError},
-       type         => $type,
+       type         => "restore",
        bkupSrcHost  => $RestoreReq{hostSrc},
        bkupSrcShare => $RestoreReq{shareSrc},
        bkupSrcNum   => $RestoreReq{num},
@@ -637,9 +637,10 @@ sub UserCommandRun
        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