mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-23 19:02:17 +00:00
fix(destiny): match complete states when advancing the chain
Substring and regular-expression matches can mistake a different boot state or image name for a completed chain. Compare the full state values while preserving the completed boot exception.
This commit is contained in:
@@ -845,7 +845,10 @@ sub nextdestiny {
|
||||
unless ($ref->{currchain}) { #If no current chain, copy the default
|
||||
$ref->{currchain} = $ref->{chain};
|
||||
} elsif ($ref->{currchain} !~ /[,;]/){
|
||||
if ($ref->{currstate} and ($ref->{currchain} =~ /$ref->{currstate}/)) {
|
||||
my $completed_state = $ref->{currchain};
|
||||
# setdestiny records ondiscover without its command arguments.
|
||||
$completed_state = 'ondiscover' if $completed_state =~ /^ondiscover=/;
|
||||
if ($ref->{currstate} and $completed_state eq $ref->{currstate}) {
|
||||
# 'boot' is the steady state a completed provision leaves behind,
|
||||
# set by setdestiny once the install or netboot destiny is applied.
|
||||
# Some installers advance the destiny more than once, so it has to
|
||||
|
||||
Reference in New Issue
Block a user