From 51f6b80eabb41a537bdd2d2f7548acfd7e33d893 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 21 Apr 2010 18:49:24 +0000 Subject: [PATCH] fix rsync multiple nodes hierarchy problem building from file name ( multiple SNsyncfiledir in path) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5841 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCLI.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index b982065ab..ffad9b65f 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -4447,7 +4447,7 @@ sub parse_rsync_input_file_on_MN { # if syncing the Service Node, file goes to the same place - # where it was on the MN but in the syncdir on the service + # where it was on the MN off the syncdir on the service # node if ($rsyncSN == 1) { # syncing the SN @@ -4604,15 +4604,14 @@ sub parse_rsync_input_file_on_SN # for each file on the line foreach my $srcfile (@srcfiles) { - my $tmpsrcfile = $syncdir; # add syndir on front - $tmpsrcfile .= $srcfile; - $srcfile = $tmpsrcfile; + my $newsrcfile = $syncdir; # add syndir on front + $newsrcfile .= $srcfile; $$options{'destDir_srcFile'}{$target_node}{$dest_dir} ||= {}; # can be full file name for destination or just the # directory name. For source must be full path - my $src_basename = basename($srcfile); # get file name + my $src_basename = basename($newsrcfile); # get file name my $dest_basename; # destination file name if (-e $dest_file) @@ -4649,14 +4648,14 @@ sub parse_rsync_input_file_on_SN $$options{'destDir_srcFile'}{$target_node}{$dest_dir} {'same_dest_name'} ||= []; push @{$$options{'destDir_srcFile'}{$target_node} - {$dest_dir}{'same_dest_name'}}, $srcfile; + {$dest_dir}{'same_dest_name'}}, $newsrcfile; } else # changing file names { $$options{'destDir_srcFile'}{$target_node}{$dest_dir} {'diff_dest_name'} ||= {}; $$options{'destDir_srcFile'}{$target_node}{$dest_dir} - {'diff_dest_name'}{$srcfile} = $dest_basename; + {'diff_dest_name'}{$newsrcfile} = $dest_basename; } }