diff --git a/xCAT-server/lib/xcat/plugins/rinstall.pm b/xCAT-server/lib/xcat/plugins/rinstall.pm index 421b4d71e..ea2f0003a 100644 --- a/xCAT-server/lib/xcat/plugins/rinstall.pm +++ b/xCAT-server/lib/xcat/plugins/rinstall.pm @@ -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) {