From afa32d65129dd7bdee4b5a191a2dec8e4ecb9341 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Mon, 9 May 2011 03:30:44 +0000 Subject: [PATCH] fix bugs item:3288766 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9517 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPconn.pm | 4 ++++ perl-xCAT/xCAT/PPCconn.pm | 13 ++++++++----- perl-xCAT/xCAT/Usage.pm | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/perl-xCAT/xCAT/FSPconn.pm b/perl-xCAT/xCAT/FSPconn.pm index c3f3d74a8..ee1c27707 100644 --- a/perl-xCAT/xCAT/FSPconn.pm +++ b/perl-xCAT/xCAT/FSPconn.pm @@ -69,6 +69,10 @@ sub mkhwconn_parse_args return usage() if ( exists $opt{h}); + if ( !exists $opt{t} and !exists $opt{p}) { + return ( usage('Flag -t or -p must be used.')); + } + if ( exists $opt{t} and exists $opt{p}) { return( usage('Flags -t and -p cannot be used together.')); diff --git a/perl-xCAT/xCAT/PPCconn.pm b/perl-xCAT/xCAT/PPCconn.pm index b794aa5b9..af327ce47 100644 --- a/perl-xCAT/xCAT/PPCconn.pm +++ b/perl-xCAT/xCAT/PPCconn.pm @@ -59,11 +59,14 @@ sub mkhwconn_parse_args } return usage() if ( exists $opt{h}); - #if ( exists $opt{s} ) - #{ - # return( usage('Flags -s is just used in direct-attach enviroment.')); - #} - +#if ( exists $opt{s} ) +#{ +# return( usage('Flags -s is just used in direct-attach enviroment.')); +#} + if ( !exists $opt{t} and !exists $opt{p} and !exists $opt{s}) { + return ( usage('Flag -t or -p or -s must be used.')); + } + if ( exists $opt{t} and exists $opt{p}) { return( usage('Flags -t and -p cannot be used together.')); diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index 3a9b26fc9..f23fb4de2 100644 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -179,7 +179,7 @@ my %usage = ( rmvm [-h|--help|-v|--version]", "lsslp" => "Usage: lsslp [-h|--help|-v|--version] - lsslp [][-V|--verbose][-i ip[,ip..]][-w][-r|-x|-z][-n][-I][-s BPA|MM|IVM|RSA|FSP|HMC][-C counts][-T timeout] + lsslp [][-V|--verbose][-i ip[,ip..]][-w][-r|-x|-z][-n][-I][-s FRAME|CEC|MM|IVM|RSA|HMC][-C counts][-T timeout] [-t tries][-m][-e cmd][-c [timeinterval[interval,..]]][--vpdtable] [-M vpd|switchport][--makedhcp][--updatehost][--resetnet]", "rflash" =>