2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

Merge pull request #5997 from immarvin/onsyncfile

fix issue xdcp EXECUTE of .post script not working as expected #5987
This commit is contained in:
cxhong 2019-02-12 09:20:59 -05:00 committed by GitHub
commit d481e07bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5936,6 +5936,11 @@ sub run_rsync_postscripts
# return from rsync is tmp/file1 not /tmp/file1
substr($tmppostfile, 0, 1) = "";
# now remove .post from the postscript file for the compare
# with the returned file name
my($tp,$post) = split(/\.post/,$tmppostfile);
$tmppostfile = $tp;
foreach my $line (@rsync_output) {
my ($hostname, $ps) = split(/: /, $line);
chomp $ps;
@ -5948,7 +5953,11 @@ sub run_rsync_postscripts
}
next;
}
if ($tmppostfile eq $ps) {
#the $postsfile <file>.post will be run if:
# the <file> is updated, or
# the <file>.post file is updated
if ($ps eq $tmppostfile or $ps eq $tmppostfile.".post" ) {
# build xdsh queue
# build host and all scripts to execute