mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
Support multiple syncfile list for packimage process (#5524)
This commit is contained in:
parent
0dc260db29
commit
dcaa21aa13
@ -423,13 +423,19 @@ sub process_request {
|
||||
if (not $nosyncfiles) {
|
||||
# sync fils configured in the synclist to the rootimage
|
||||
$syncfile = xCAT::SvrUtils->getsynclistfile(undef, $osver, $arch, $profile, "netboot", $imagename);
|
||||
if ( defined($syncfile) && -f $syncfile && -d $rootimg_dir) {
|
||||
if ( defined($syncfile) && -d $rootimg_dir) {
|
||||
my $myenv='';
|
||||
if($envars){
|
||||
$myenv.=" XCAT_OSIMAGE_ENV=$envars";
|
||||
}
|
||||
print "Syncing files from $syncfile to root image dir: $rootimg_dir\n";
|
||||
system("$myenv $::XCATROOT/bin/xdcp -i $rootimg_dir -F $syncfile");
|
||||
my @filelist = split ',', $syncfile;
|
||||
foreach my $synclistfile (@filelist) {
|
||||
if ( -f $synclistfile) {
|
||||
print "Syncing files from $synclistfile to root image dir: $rootimg_dir\n";
|
||||
my $cmd = "$myenv $::XCATROOT/bin/xdcp -i $rootimg_dir -F $synclistfile";
|
||||
xCAT::Utils->runcmd($cmd, 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print "Bypass of syncfiles requested, will not sync files to root image directory.\n";
|
||||
|
@ -233,10 +233,14 @@ sub process_request {
|
||||
|
||||
#sync fils configured in the synclist to the rootimage
|
||||
$syncfile = xCAT::SvrUtils->getsynclistfile(undef, $osver, $arch, $profile, "netboot", $imagename);
|
||||
if (defined($syncfile) && -f $syncfile
|
||||
&& -d $rootimg_dir) {
|
||||
print "sync files from $syncfile to the $rootimg_dir\n";
|
||||
`$::XCATROOT/bin/xdcp -i $rootimg_dir -F $syncfile`;
|
||||
if (defined($syncfile) && -d $rootimg_dir) {
|
||||
my @filelist = split ',', $syncfile;
|
||||
foreach my $synclistfile (@filelist) {
|
||||
if ( -f $synclistfile) {
|
||||
print "sync files from $synclistfile to the $rootimg_dir\n";
|
||||
`$::XCATROOT/bin/xdcp -i $rootimg_dir -F $synclistfile`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# check if the file "litefile.save" exists or not
|
||||
|
Loading…
x
Reference in New Issue
Block a user