From bd5dcc529228e9e1dc9e93fa1ce9c6b8d834cad3 Mon Sep 17 00:00:00 2001 From: yinle Date: Sun, 22 May 2011 11:59:04 +0000 Subject: [PATCH] support rmhwconn -s and lshwconn -s. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9647 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPconn.pm | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/perl-xCAT/xCAT/FSPconn.pm b/perl-xCAT/xCAT/FSPconn.pm index ee8bcdf54..584f4b944 100644 --- a/perl-xCAT/xCAT/FSPconn.pm +++ b/perl-xCAT/xCAT/FSPconn.pm @@ -56,14 +56,14 @@ sub mkhwconn_parse_args $Getopt::Long::ignorecase = 0; Getopt::Long::Configure( "bundling" ); - if ( !GetOptions( \%opt, qw(V|verbose h|help t T=s p=s P=s port=s) )) { + if ( !GetOptions( \%opt, qw(V|verbose h|help t s T=s p=s P=s port=s) )) { return( usage() ); } if ( exists $opt{s} ) { - my $opttmp = xCAT::PPCconn::mkhwconn_parse_args($request, $args); - return $opttmp; + my $opttmp = xCAT::PPCconn::mkhwconn_parse_args($request, $args); + return $opttmp; } @@ -300,7 +300,13 @@ sub lshwconn_parse_args $Getopt::Long::ignorecase = 0; Getopt::Long::Configure( "bundling" ); - if ( !GetOptions( \%opt, qw(V|verbose h|help T=s) )) { + if ( exists $opt{s} ) + { + my $opttmp = xCAT::PPCconn::lshwconn_parse_args($request, $args); + return $opttmp; + } + + if ( !GetOptions( \%opt, qw(V|verbose h|help T=s s) )) { return( usage() ); } return usage() if ( exists $opt{h}); @@ -421,11 +427,17 @@ sub rmhwconn_parse_args $Getopt::Long::ignorecase = 0; Getopt::Long::Configure( "bundling" ); - if ( !GetOptions( \%opt, qw(V|verbose h|help T=s) )) { + if ( !GetOptions( \%opt, qw(V|verbose h|help T=s s) )) { return( usage() ); } return usage() if ( exists $opt{h}); - + + if ( $opt{s} ) + { + my $opttmp = xCAT::PPCconn::rmhwconn_parse_args($request, $args); + return $opttmp; + } + if( ! exists $opt{T} ) { $opt{T} = "lpar"; #defaut value is lpar.