2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

fix issue Weird problem with rinstall #3877 (#3883)

This commit is contained in:
yangsong 2017-09-08 14:14:20 +08:00 committed by Bin Xu
parent 1f50bf6714
commit 22b51e3efa
2 changed files with 8 additions and 7 deletions

View File

@ -21,7 +21,6 @@ use Getopt::Long;
use xCAT::MsgUtils;
use xCAT::Utils;
use xCAT::Client;
use xCAT::NodeRange;
use Cwd;
use strict;
@ -72,12 +71,6 @@ if(grep m/^-c|--console$/,@ARGV){
}
my $noderange = $cmdref->{noderange}->[0]; # save the noderange
my @noderange=xCAT::NodeRange::noderange($noderange);
if($bname eq "rinstall" and $startconsole==1 and scalar @noderange!=1 ){
xCAT::MsgUtils->message("E", "Error: rinstall -c/--console can only be run against one node! Please use winstall -c/--console for multiple nodes.");
exit 1;
}
# Allow to print server information when -V/--verbose
foreach (reverse(@ARGV)) {

View File

@ -166,6 +166,14 @@ sub rinstall {
return 1;
}
if($command eq "rinstall" and scalar(@nodes) > 1 and $CONSOLE){
my $rsp;
$rsp->{errorcode}->[0]=1;
$rsp->{error}->[0]="rinstall -c/--console can only be run against one node! Please use winstall -c/--console for multiple nodes.";
xCAT::MsgUtils->message("E",$rsp,$callback);
return 1;
}
my $rc = 0;
my @parameter;