mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-27 23:01:12 +00:00
fix issue 3297: rinstall could not set runcmd and runimg's currchain (#3491)
* fix issue 3297: rinstall could not set runcmd and runimg's currchain
This commit is contained in:
@@ -69,6 +69,7 @@ sub rinstall {
|
||||
my $CONSOLE;
|
||||
my $OSIMAGE;
|
||||
my $STATES;
|
||||
my $RESTSTATES;
|
||||
my $ignorekernelchk;
|
||||
my $VERBOSE;
|
||||
my $HELP;
|
||||
@@ -108,8 +109,7 @@ sub rinstall {
|
||||
}
|
||||
|
||||
my $state = $ARGV[0];
|
||||
my $reststates;
|
||||
($state, $reststates) = split(/,/, $state, 2);
|
||||
($state, $RESTSTATES) = split(/,/, $state, 2);
|
||||
chomp($state);
|
||||
if ($state eq "image" or $state eq "winshell" or $state =~ /^osimage/) {
|
||||
my $target;
|
||||
@@ -251,13 +251,20 @@ sub rinstall {
|
||||
#only provision the normal nodes
|
||||
@nodes = @validnodes;
|
||||
|
||||
push @parameter, "osimage=$OSIMAGE";
|
||||
if ($RESTSTATES) {
|
||||
push @parameter, "osimage=$OSIMAGE,$RESTSTATES";
|
||||
} else {
|
||||
push @parameter, "osimage=$OSIMAGE";
|
||||
}
|
||||
if ($ignorekernelchk) {
|
||||
push @parameter, " --ignorekernelchk";
|
||||
}
|
||||
}
|
||||
elsif ($STATES) {
|
||||
push @parameter, "$STATES";
|
||||
if ($RESTSTATES) {
|
||||
$parameter[-1] .= ",$RESTSTATES";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -310,8 +317,10 @@ sub rinstall {
|
||||
|
||||
#only provision the normal nodes
|
||||
@nodes = @validnodes;
|
||||
|
||||
push @parameter, "osimage";
|
||||
if ($RESTSTATES) {
|
||||
$parameter[-1] .= ",$RESTSTATES";
|
||||
}
|
||||
}
|
||||
|
||||
if (scalar(@nodes) == 0) {
|
||||
|
Reference in New Issue
Block a user