Fix bug 3491699: rnetboot "-V" issue

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11789 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2012-03-08 05:18:32 +00:00
parent 16f97547b4
commit d266a464d8

View File

@ -45,7 +45,7 @@ sub parse_args {
$Getopt::Long::ignorecase = 0;
Getopt::Long::Configure( "bundling" );
if ( !GetOptions( \%opt, qw(h|help V|Verbose v|version I|iscsiboot F f o s=s m:s@ r=s t=s) )) {
if ( !GetOptions( \%opt, qw(h|help V T v|version I|iscsiboot F f o s=s m:s@ r=s t=s) )) {
return( usage() );
}
@ -77,6 +77,17 @@ sub parse_args {
return(usage());
}
}
#############################################
# T is used for trace, V is used for debug
#############################################
if (exists($opt{T})) {
$opt{V} = 1;
delete $opt{T};
}elsif(exists($opt{V})) {
$opt{T} = 1;
delete $opt{V};
}
####################################
# Check for "-" with no option
####################################
@ -154,7 +165,7 @@ sub do_rnetboot {
#######################################
# Turn on verbose and debugging
#######################################
if ( exists($request->{verbose}) ) {
if ( ${$request->{arg}}[0] eq '-V' ) {
#$cmd.= " -v -x";
$optarg{'v'} = 1; #for verbose
$optarg{'x'} = 1; #for debug