diff options
author | Rene Ladan <rene@FreeBSD.org> | 2016-06-21 20:39:00 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2016-06-21 20:39:00 +0000 |
commit | d7f14db9fc786bef5793acb409a88bb84228fd8d (patch) | |
tree | d23a5c49401b1dfd3c101a07e381b19604708fbd /sysutils/backuppc/files/patch-lib_BackupPC_Xfer_Smb.pm | |
parent | Update devel/elixir-connection to version 1.0.3. (diff) |
sysutils/backuppc: add a workaround for users of Samba 4.
Using Samba 3.6 is still reccommended
PR: 209874
Submitted by: myself, patch by maintainer
Diffstat (limited to 'sysutils/backuppc/files/patch-lib_BackupPC_Xfer_Smb.pm')
-rw-r--r-- | sysutils/backuppc/files/patch-lib_BackupPC_Xfer_Smb.pm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sysutils/backuppc/files/patch-lib_BackupPC_Xfer_Smb.pm b/sysutils/backuppc/files/patch-lib_BackupPC_Xfer_Smb.pm new file mode 100644 index 000000000000..f12b03731c64 --- /dev/null +++ b/sysutils/backuppc/files/patch-lib_BackupPC_Xfer_Smb.pm @@ -0,0 +1,33 @@ +--- lib/BackupPC/Xfer/Smb.pm.orig 2016-06-04 10:42:02 UTC ++++ lib/BackupPC/Xfer/Smb.pm +@@ -217,7 +217,7 @@ sub readOutput + # This section is highly dependent on the version of smbclient. + # If you upgrade Samba, make sure that these regexp are still valid. + # +- if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) { ++ if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) { + my $sambaFileSize = $1; + my $pcFileName = $2; + (my $fileName = $pcFileName) =~ s/\\/\//g; +@@ -230,7 +230,9 @@ sub readOutput + $t->{byteCnt} += $2; + $t->{fileCnt}++; + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 1 ); +- } elsif ( /^\s*tar: dumped \d+ files/ ) { ++ } elsif ( /^\s*tar: dumped \d+ files/ ++ || /Total bytes received: \d+/i ++ || /tar_process done, err = 0/ ) { + $t->{xferOK} = 1; + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 ); + } elsif ( /^\s*tar: restored \d+ files/ ) { +@@ -270,6 +272,10 @@ sub readOutput + } elsif ( /^\s*directory \\/i ) { + $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 ); + } elsif ( /smb: \\>/ ++ || /^tar:\d+\s/ ++ || /^ NTLMSSP_/ ++ || /^GENSEC backend / ++ || /^doing parameter / + || /^\s*added interface/i + || /^\s*tarmode is now/i + || /^\s*Total bytes written/i |