2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 01:26:38 +00:00

fix issue 5245, return 0 when pscp -h

This commit is contained in:
xuweibj 2018-09-06 02:28:05 -04:00
parent 6fe47527aa
commit da557f4967

View File

@ -20,7 +20,7 @@ my $interface;
GetOptions(
"interface=s" => \$interface,
"f|fanout=s" => \$fanout,
"h|help" => \$usage,
"h|help" => \&usage,
"v|version" => \$::VERSION,
);
my %nodehdl;
@ -32,9 +32,17 @@ if ($ENV{XCATHOST}) {
sub usage
{
print $_[0];
my $rc = 1;
my @info = @_;
if (@info) {
if ($info[0] eq "h") {
$rc = 0;
} else {
print $info[0];
}
}
print "Usage: pscp [ -f fanout] [-i <SUFFIX>] [SCP OPTIONS...] FILE... <NODERANGE>:<DESTINATION>\n";
exit 1;
exit $rc;
}
my $pshmaxp = 64;