fix parsing of command

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1921 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2008-07-22 14:22:02 +00:00
parent bfe358c9e8
commit cd4007a71a

View File

@ -47,13 +47,23 @@ my $cmdref;
my $arg;
my @SaveARGV = @ARGV;
$cmdref->{command}->[0] = $bname; # save my command name
# check for help, bypass, other client flags
if ($bname eq "xdsh")
{
&parse_args_xdsh;
}
else
{ # xdcp
&parse_args_xdcp;
}
my $arg = shift(@SaveARGV);
if ($arg =~ /^-/) # no noderange
{
xCAT::MsgUtils->message(
"I",
"Node range not specified, see man page for syntax.\n"
"Node range not specified, see $bname man page for syntax.\n"
);
exit 1;
}
@ -70,16 +80,6 @@ else
@ARGV = @SaveARGV; # noderange removed for parsing
}
# check for help, bypass, other client flags
if ($bname eq "xdsh")
{
&parse_args_xdsh;
}
else
{ # xdcp
&parse_args_xdcp;
}
foreach (@SaveARGV)
{
push(@{$cmdref->{arg}}, $_);