2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-28 07:11:11 +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:
zet809
2017-07-18 18:17:14 +08:00
committed by Bin Xu
parent 6ca241c9d0
commit 4f0bd2b5ba

View File

@@ -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) {