mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-20 10:10:22 +00:00
syncfiles: try to fix the issue where sync lists are generated with the (#5680)
wrong destination username. Bugs #4455, #5252
This commit is contained in:
@@ -151,7 +151,7 @@ sub remote_copy_command
|
||||
or die "Can not open file $rsyncfile";
|
||||
my $dest_dir_list = join ' ', keys %{ $$config{'destDir_srcFile'} };
|
||||
my $dest_user_host = $$config{'dest-host'};
|
||||
if ($$config{'dest-user'})
|
||||
if (getpwnam($$config{'dest-user'}))
|
||||
{
|
||||
$dest_user_host =
|
||||
"$$config{'dest-user'}@" . "$$config{'dest-host'}";
|
||||
|
@@ -150,7 +150,7 @@ sub remote_copy_command {
|
||||
|
||||
open SCPCMDFILE, "> $scpfile"
|
||||
or die "Can not open file $scpfile";
|
||||
if ($$config{'dest-user'})
|
||||
if (getpwnam($$config{'dest-user'}))
|
||||
{
|
||||
$dest_user_host =
|
||||
"$$config{'dest-user'}@" . "$$config{'dest-host'}";
|
||||
|
Reference in New Issue
Block a user