From b07dcac380f9b3a37d0c98e57216f7b279169b35 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 2 Jun 2009 03:05:05 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/PPCboot.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/PPCboot.pm b/perl-xCAT/xCAT/PPCboot.pm index 9817b612f..39d6008aa 100644 --- a/perl-xCAT/xCAT/PPCboot.pm +++ b/perl-xCAT/xCAT/PPCboot.pm @@ -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) {