From 8ac336fe7eeaf82333a6309faea43a57b97c833c Mon Sep 17 00:00:00 2001 From: cxhong Date: Tue, 27 Nov 2018 01:58:11 -0500 Subject: [PATCH] EXECUTEALWAYS will only execute syncfile in the syncfile list (#5834) --- perl-xCAT/xCAT/DSHCLI.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index ecafd5446..c69bcd564 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -6313,7 +6313,18 @@ sub run_always_rsync_postscripts # build xdsh queue # build host and all scripts to execute - push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host); + # 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} }) { + 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++; + } + } + } } }