2
0
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:
Kilian Cavalotti
2018-10-12 01:14:30 -07:00
committed by Bin Xu
parent 3d6aab2924
commit 0c0854aa2b
2 changed files with 2 additions and 2 deletions

View File

@@ -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'}";

View File

@@ -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'}";