Fixed the issue that rnetboot doesn't work with uppercase mac addresses and the issue that chvm doesn't accept std input.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9833 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
988430673b
commit
0b7b1429d9
@ -97,10 +97,11 @@ sub do_rnetboot {
|
||||
}
|
||||
}
|
||||
|
||||
my $mac = lc($opt->{m});
|
||||
#######################################
|
||||
# Network specified
|
||||
#######################################
|
||||
$cmd.= " -s auto -d auto -m \"$opt->{m}\" -S $opt->{S} -G $opt->{G} -C $opt->{C}";
|
||||
$cmd.= " -s auto -d auto -m \"$mac\" -S $opt->{S} -G $opt->{G} -C $opt->{C}";
|
||||
if ( exists( $opt->{o} )) {
|
||||
$cmd.= " -o";
|
||||
}
|
||||
|
@ -187,7 +187,8 @@ sub do_rnetboot {
|
||||
#######################################
|
||||
# Network specified
|
||||
#######################################
|
||||
$cmd.= " -s auto -d auto -m $mac -S $opt->{S} -C $opt->{C} -N $opt->{N}";
|
||||
my $mac_a = lc($mac);
|
||||
$cmd.= " -s auto -d auto -m $mac_a -S $opt->{S} -C $opt->{C} -N $opt->{N}";
|
||||
if (defined($opt->{G}))
|
||||
{
|
||||
$cmd.= " -G $opt->{G}";
|
||||
|
@ -7,6 +7,7 @@ use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR);
|
||||
use xCAT::PPCdb;
|
||||
use xCAT::Usage;
|
||||
use xCAT::NodeRange;
|
||||
use Data::Dumper;
|
||||
|
||||
|
||||
##############################################
|
||||
@ -56,7 +57,7 @@ sub chvm_parse_args {
|
||||
#############################################
|
||||
# Process command-line arguments
|
||||
#############################################
|
||||
if ( !defined( $args )) {
|
||||
if ( !defined( $args ) && !defined( $request->{stdin} ) ) {
|
||||
$request->{method} = $cmd;
|
||||
return( usage() );
|
||||
}
|
||||
@ -65,7 +66,8 @@ sub chvm_parse_args {
|
||||
# to be grouped (e.g. -vx), and terminates
|
||||
# at the first unrecognized option.
|
||||
#############################################
|
||||
@ARGV = @$args;
|
||||
if ($args) { @ARGV = @$args; }
|
||||
else { @ARGV = (); }
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
Getopt::Long::Configure( "bundling" );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user