2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Modified syncfile list for EXECUTEALWAYS clause

This commit is contained in:
Casandra Qiu 2018-12-18 11:00:24 -05:00
parent 6514297599
commit 530399d598

View File

@ -6315,13 +6315,23 @@ sub run_always_rsync_postscripts
# build host and all scripts to execute
# EXECUTEALWAYS will only execute the syncfile in the syncfile list
foreach my $key (keys %{$$options{'destDir_srcFile'}{$host}}) {
foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}{$key} }) {
foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}->{$key} }) {
my $index = 0;
while (my $src_file = $$options{'destDir_srcFile'}{$host}{$key}{$key1}->[$index]) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
$index++;
my $key1_ref = $$options{'destDir_srcFile'}{$host}->{$key}->{$key1};
if (ref $key1_ref eq 'ARRAY') { #stored as ARRAY for same_dest_name
while (my $src_file =$$options{'destDir_srcFile'}{$host}->{$key}->{$key1}->[$index] ) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
$index++;
}
} else { #stroed as hash table for diff_dest_name
my %src_hash = %{ $$options{'destDir_srcFile'}{$host}{$key}{$key1} };
foreach my $src_file (keys %src_hash) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
}
}
}
}
@ -6330,8 +6340,6 @@ sub run_always_rsync_postscripts
# now if we have postscripts to run, run xdsh
my $out;
foreach my $ps (keys %{ $$dshparms{'postscripts'} }) {
my @nodes;