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

Merge pull request #5603 from xuweibj/I5245

fix issue 5245, return 0 when pscp -h
This commit is contained in:
zet809 2018-09-07 11:06:14 +08:00 committed by GitHub
commit d6f1eef857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;