From cd4007a71ad00f7d3186ce85691b7e94c5c3d57d Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 22 Jul 2008 14:22:02 +0000 Subject: [PATCH] fix parsing of command git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1921 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xdsh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index c727083a0..bdfea2b1b 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -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}}, $_);