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}}, $_);