$OpenBSD: patch-usr_share_mysql-zrm_plugins_ssh-copy_pl,v 1.1 2012/04/03 10:56:03 giovanni Exp $
--- usr/share/mysql-zrm/plugins/ssh-copy.pl.orig	Thu Feb  4 01:19:25 2010
+++ usr/share/mysql-zrm/plugins/ssh-copy.pl	Tue Apr  3 12:41:10 2012
@@ -52,7 +52,7 @@ $ENV{"PATH"}="/usr/local/bin:/opt/csw/bin:/bin:/usr/bi
 
 my $SSH="ssh";
 my @SSH_ARR;
-my $TAR="tar";
+my $TAR="gtar";
 my $RM="rm";
 my $MKDIR="mkdir";
 my $LS="ls";
@@ -273,7 +273,7 @@ sub doCreateLinks()
 
 	my $f = basename($tmpFile);
 	my $d = dirname( $tmpFile);
-	$r = system( "$TAR --same-owner $compress -cphsC $d $f | $SSH $REMOTE_USER\@$host $TAR --same-owner $compress -xphsC $TMP_DIR" );
+	$r = system( "$TAR --same-owner $compress -f- -cphsC $d $f | $SSH $REMOTE_USER\@$host $TAR --same-owner $compress -f- -xphsC $TMP_DIR" );
 
 	unlink( $tmpFile );	
 	if( $r > 0 ){
@@ -291,7 +291,7 @@ sub doCreateLinks()
 sub doTar()
 {
 	my $cmd;
-	my $tarCmd = "$TAR --same-owner $compress -phsC ";
+	my $tarCmd = "$TAR --same-owner $compress -f- -phsC ";
 	
 	my $fileList = $srcFile;
 	my $lsCmd = "";
@@ -336,7 +336,7 @@ sub doMySQLHotCopy()
 		die( "mysqlhotcopy on host $host failed" );
 	}
 	
-	$r = system( "$SSH $REMOTE_USER\@$host $TAR --same-owner $compress -cphsC $TMP_DIR . | $TAR --same-owner $compress -xphsC $destDir" );
+	$r = system( "$SSH $REMOTE_USER\@$host $TAR --same-owner $compress -f- -cphsC $TMP_DIR . | $TAR --same-owner $compress -f- -xphsC $destDir" );
 	
 	&removeTmpDir();
 	if( $r > 0 ){
@@ -440,7 +440,7 @@ sub doSnapshotCommand()
 
 	my $f = basename($fName);
 	my $d = dirname( $fName);
-	$r = system( "$TAR --same-owner $compress -cphsC $d $f | $SSH $REMOTE_USER\@$host $TAR --same-owner $compress -xphsC $TMP_DIR" );
+	$r = system( "$TAR --same-owner $compress -f- -cphsC $d $f | $SSH $REMOTE_USER\@$host $TAR --same-owner $compress -f- -xphsC $TMP_DIR" );
 
 	unlink( $fName );	
 	if( $r > 0 ){
