From 553d8a203bc56d4572e745439916284bb0221dc4 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 14 Nov 2012 13:26:27 +0000 Subject: [PATCH] fix defect 3175 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14323 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/RSYNC.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/RSYNC.pm b/perl-xCAT/xCAT/RSYNC.pm index 1aad78ea3..4039a434b 100644 --- a/perl-xCAT/xCAT/RSYNC.pm +++ b/perl-xCAT/xCAT/RSYNC.pm @@ -145,7 +145,7 @@ sub remote_copy_command if ($localhost == 1) { # running to the MN from the MN print RSCYCCMDFILE "/bin/mkdir -p $dest_dir_list\n"; - } else { # not running to another node + } else { # running to another node if ($usersh == 0) { # using ssh print RSCYCCMDFILE "/usr/bin/ssh $dest_user_host '/bin/mkdir -p $dest_dir_list'\n"; @@ -176,8 +176,14 @@ sub remote_copy_command { my $diff_basename = $diff_dest_hash{$src_file_diff_dest}; - print RSCYCCMDFILE + # if localhost do not put in hostname: + if ($localhost == 1) { # running to the MN from the MN (local) + print RSCYCCMDFILE + "$exec_path $sync_opt $src_file_diff_dest $dest_dir/$diff_basename\n"; + } else { # running remote + print RSCYCCMDFILE "$exec_path $sync_opt $src_file_diff_dest $dest_user_host:$dest_dir/$diff_basename\n"; + } } }