mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-23 14:35:38 +00:00
fix psh/pscp -v and -h
This commit is contained in:
@ -5,6 +5,7 @@ BEGIN
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr';
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use xCAT::Utils;
|
||||
use IO::Socket::SSL;
|
||||
use XML::Simple;
|
||||
$XML::Simple::PREFERRED_PARSER='XML::Parser';
|
||||
@ -18,9 +19,12 @@ my $interface;
|
||||
GetOptions(
|
||||
"interface=s" => \$interface,
|
||||
"f|fanout=s" => \$fanout,
|
||||
"h|help" => \$usage,
|
||||
"v|version" => \$::VERSION,
|
||||
);
|
||||
my %nodehdl;
|
||||
my $xcathost='localhost:3001';
|
||||
if ($::VERSION) {print xCAT::Utils->Version() . "\n"; exit 0}
|
||||
if ($ENV{XCATHOST}) {
|
||||
$xcathost=$ENV{XCATHOST};
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ use IO::Socket::SSL;
|
||||
use XML::Simple;
|
||||
$XML::Simple::PREFERRED_PARSER='XML::Parser';
|
||||
#use Data::Dumper;
|
||||
use xCAT::Utils;
|
||||
use IO::Handle;
|
||||
use IO::Select;
|
||||
use Getopt::Long;
|
||||
@ -30,9 +31,13 @@ if (!GetOptions(
|
||||
'f|fanout=s' => \$fanout,
|
||||
"nonodecheck" => \$::NONODECHECK, #does not check the noderange, in this case, noderange need to be a list of nodes.
|
||||
'h|help' => \$help,
|
||||
) || $help || scalar(@ARGV)<2 ) {
|
||||
print "Usage: psh [-i <interface>] [-l <user>] [-f <fanout>] [--nonodecheck] [-t <timeout value in seconds>] <noderange> <command>\n";
|
||||
exit;
|
||||
"v|version" => \$::VERSION,
|
||||
) || scalar(@ARGV)<2 ) {
|
||||
if ($::VERSION) {print xCAT::Utils->Version() . "\n"; exit 0}
|
||||
if ($help) {
|
||||
print "Usage: psh [-i <interface>] [-l <user>] [-f <fanout>] [--nonodecheck] [-t <timeout value in seconds>] <noderange> <command>\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
my %nodehdl;
|
||||
my $xcathost='localhost:3001';
|
||||
|
Reference in New Issue
Block a user