From eb81dc5640c2fafb7d20b50bdb4bc0a02ab9e48c Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 4 Nov 2008 15:10:20 +0000 Subject: [PATCH] fix call to xdsh and xdcp with no parameters git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2462 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCLI.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index 0ea1496ee..d0174d7f4 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -3537,8 +3537,12 @@ sub parse_and_run_dsh { my ($class, $nodes, $args, $callback, $command, $noderange) = @_; - @ARGV = @{$args}; # get arguments $::CALLBACK = $callback; + if (!($args)) { + usage_dsh; + exit 1; + } + @ARGV = @{$args}; # get arguments if ($ENV{'XCATROOT'}) { $::XCATROOT = $ENV{'XCATROOT'}; # setup xcatroot home directory @@ -3813,8 +3817,12 @@ sub usage_dcp sub parse_and_run_dcp { my ($class, $nodes, $args, $callback, $command, $noderange) = @_; - @ARGV = @{$args}; # get arguments $::CALLBACK = $callback; + if (!($args)) { + usage_dcp; + exit 1; + } + @ARGV = @{$args}; # get arguments if ($ENV{'XCATROOT'}) { $::XCATROOT = $ENV{'XCATROOT'}; # setup xcatroot home directory