Try again; cvs got an error:
authorcbarratt <cbarratt>
Fri, 7 Feb 2003 05:51:22 +0000 (05:51 +0000)
committercbarratt <cbarratt>
Fri, 7 Feb 2003 05:51:22 +0000 (05:51 +0000)
 - Fixed rsync is case of shareName = '/'
 - Repaired host name regex to correctly allow '-' in host name
 - Added sshPath to Pre/Post command vars
 - Ensured child exited after failed exec for Pre/Post commands
 - Added space before $I_option in Smb.
 - Made $I_option a listref, rather than string, for Smb

lib/BackupPC/Lib.pm
lib/BackupPC/Xfer/Rsync.pm
lib/BackupPC/Xfer/Smb.pm

index 8cc1e83..e061eee 100644 (file)
@@ -314,7 +314,7 @@ sub HostInfoRead
         s/[\n\r]+//;
         s/#.*//;
         s/\s+$//;
-        next if ( /^\s*$/ || !/^([\w\.-\\]+\s+.*)/ );
+        next if ( /^\s*$/ || !/^([\w\.\\-]+\s+.*)/ );
         #
         # Split on white space, except if preceded by \
         # using zero-width negative look-behind assertion
@@ -985,6 +985,8 @@ sub cmdSystemOrEval
             close(STDERR);
            open(STDERR, ">&STDOUT");
            exec(@$cmd);
+            print("Exec of @$cmd failed\n");
+            exit(1);
        }
        #
        # The parent gathers the output from the child
index 11103ca..cf20d64 100644 (file)
@@ -119,7 +119,7 @@ sub start
     #
     # We add a slash to the share name we pass to rsync
     #
-    ($t->{shareNameSlash} = "$t->{shareName}/") =~ s{//+$}{};
+    ($t->{shareNameSlash} = "$t->{shareName}/") =~ s{//+$}{/};
 
     if ( $t->{type} eq "restore" ) {
         $rsyncClientCmd = $conf->{RsyncClientRestoreCmd};
index bfd367a..d3b688b 100644 (file)
@@ -78,7 +78,7 @@ sub start
     my($t) = @_;
     my $bpc = $t->{bpc};
     my $conf = $t->{conf};
-    my $I_option = $t->{hostIP} eq $t->{host} ? "" : " -I $t->{hostIP}";
+    my $I_option = $t->{hostIP} eq $t->{host} ? [] : ['-I', $t->{hostIP}];
     my(@fileList, $X_option, $smbClientCmd, $logMsg);
     my($timeStampFile);
     local(*SMB);