fix rsync bugs, do not remove the file from the list if it does not exit, show the error
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3555 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
9670a9c94a
commit
6180629d5c
@ -912,6 +912,7 @@ sub fork_fanout_dcp
|
||||
or die "can not open file /tmp/rsync_$user_target";
|
||||
my $dest_dir_list = join ' ',
|
||||
keys %{$$options{'destDir_srcFile'}{$user_target}};
|
||||
print RSYNCCMDFILE "#!/bin/sh\n";
|
||||
print RSYNCCMDFILE "/bin/mkdir -p $dest_dir_list\n";
|
||||
foreach my $dest_dir (
|
||||
keys %{$$options{'destDir_srcFile'}{$user_target}})
|
||||
|
@ -82,6 +82,7 @@ sub remote_copy_command
|
||||
$dest_user_host =
|
||||
"$$config{'dest-user'}@" . "$$config{'dest-host'}";
|
||||
}
|
||||
print RSCYCCMDFILE "#!/bin/sh\n";
|
||||
print RSCYCCMDFILE
|
||||
"/usr/bin/ssh $dest_user_host '/bin/mkdir -p $dest_dir_list'\n";
|
||||
|
||||
@ -89,7 +90,8 @@ sub remote_copy_command
|
||||
{
|
||||
my @src_file =
|
||||
@{$$config{'destDir_srcFile'}{$dest_dir}{'same_dest_name'}};
|
||||
@src_file = map { $_ if -e $_; } @src_file;
|
||||
#Remove a file from the list if it does not exist
|
||||
#@src_file = map { $_ if -e $_; } @src_file;
|
||||
my $src_file_list = join ' ', @src_file;
|
||||
if ($src_file_list)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user