From 91e26aeb148de30e8fe1bf8e3120356204f10852 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 20 Nov 2015 02:58:43 -0500 Subject: [PATCH] fix defect 107 to avoid replacing link files in Automation ENV --- xCAT-server/share/xcat/tools/xCATreg | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/tools/xCATreg b/xCAT-server/share/xcat/tools/xCATreg index b4527f958..c3f465c36 100644 --- a/xCAT-server/share/xcat/tools/xCATreg +++ b/xCAT-server/share/xcat/tools/xCATreg @@ -405,10 +405,12 @@ sub copy_code { #copy xcat-core source code to MN:/ if($mn =~ /ubuntux/){ - $res = system("xdsh $confkeys{$mn} 'mkdir -p /xcatbuild' && scp -r $xcatcoredir root\@$confkeys{$mn}:/xcatbuild/ >/dev/null"); + #defect 107 Automation ENV replaces the link file to real file before running xcat build + $res = system("xdsh $confkeys{$mn} 'mkdir -p /xcatbuild' && rsync -avz $xcatcoredir root\@$confkeys{$mn}:/xcatbuild/ >/dev/null"); }else{ - $res = system("scp -r $xcatcoredir root\@$confkeys{$mn}:/ >/dev/null"); - } + #defect 107 Automation ENV replaces the link file to real file before running xcat build + $res = system("rsync -avz $xcatcoredir root\@$confkeys{$mn}:/ >/dev/null"); + } if ($res){ send_msg(0, "[$mn->$confkeys{$mn}][copy_code] copy the latest xcat code to $mn failed"); return 1;