Allow "-" in node names

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1685 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sakolish 2008-06-18 13:10:13 +00:00
parent 093f85a1eb
commit 1639bf3bca

View File

@ -107,19 +107,10 @@ sub parse_args {
usage( "No node specified" );
return(1);
}
$node = shift @ARGV;
#######################################
# Check for multiple nodes specified
#######################################
my @nodes = split /-|,| /, $node;
if ( scalar(@nodes) > 1 ) {
usage( "multiple nodes specified" );
return(1);
}
#######################################
# Check for extra argument
#######################################
$node = shift @ARGV;
if ( defined( $ARGV[0] )) {
usage( "Invalid Argument: $ARGV[0]" );
return(1);
@ -211,7 +202,7 @@ sub invoke_cmd {
my $mtms = "$vpd->{mtm}*$vpd->{serial}";
my $host = $att->{hcp};
my $lparid = $att->{id};
my $type = "lpar";
$type = "lpar";
my %request = (
ppcretry => 1,
@ -227,8 +218,8 @@ sub invoke_cmd {
# Connect to the remote server
#################################
my @exp = xCAT::PPCcli::connect( \%request, $hwtype, $host );
if ( ref(@exp[0]) ne "Expect" ) {
return( @exp[0] );
if ( ref($exp[0]) ne "Expect" ) {
return( $exp[0] );
}
#################################
# Open console connection