Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue xdcp EXECUTE of .post script not working as expected #5987 #5997

Merged
merged 1 commit into from
Feb 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion perl-xCAT/xCAT/DSHCLI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down