fixed help info errors of rnetboot

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3479 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2009-06-02 03:05:05 +00:00
parent 5bdfaa726b
commit b07dcac380

View File

@ -16,6 +16,7 @@ sub parse_args {
my %opt = ();
my $cmd = $request->{command};
my $args = $request->{arg};
my @VERSION = qw( 2.1 );
#############################################
# Responds with usage statement
@ -40,10 +41,23 @@ sub parse_args {
$Getopt::Long::ignorecase = 0;
Getopt::Long::Configure( "bundling" );
if ( !GetOptions( \%opt, qw(V|Verbose f s=s) )) {
if ( !GetOptions( \%opt, qw(h|help V|Verbose v|version f s=s) )) {
return( usage() );
}
####################################
# Option -h for Help
####################################
if ( exists( $opt{h} )) {
return( usage() );
}
####################################
# Option -v for version
####################################
if ( exists( $opt{v} )) {
return( \@VERSION );
}
if ( exists( $opt{s} ) ){
my @boot_devices = split(/,/, $opt{s});
foreach (@boot_devices) {