mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 19:02:27 +00:00 
			
		
		
		
	fix issue 5245, return 0 when pscp -h
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user