From fac10e8032e663bad45c0a012cbf40743efb11a0 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 16 Jan 2013 11:45:09 +0000 Subject: [PATCH] fix defect 3290 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14895 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xdsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index 078d046b2..23e0e5d5c 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -208,6 +208,13 @@ exit $xCAT::Client::EXITCODE; sub parse_args_xdsh { my $snodes = shift; + # test to see if any parameters were entered + my $arraysize=@ARGV; + if ($arraysize ==0) { + my $msg= "No parameters were supplied on the xdsh command. Run xdsh -h"; + xCAT::MsgUtils->message("E", $msg); + exit 1; + } Getopt::Long::Configure("posix_default"); Getopt::Long::Configure("no_gnu_compat"); Getopt::Long::Configure("bundling"); @@ -509,6 +516,13 @@ sub parse_args_xdsh #----------------------------------------------------------------------------- sub parse_args_xdcp { + # if not parms input error out + my $arraysize=@ARGV; + if ($arraysize ==0) { + my $msg= "No parameters were supplied on the xdcp command. Run xdcp -h"; + xCAT::MsgUtils->message("E", $msg); + exit 1; + } my %options = (); Getopt::Long::Configure("posix_default");