add use strict
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1889 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d3d963f6fb
commit
79c414d841
@ -6,6 +6,7 @@ BEGIN
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr';
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use strict;
|
||||
use File::Basename;
|
||||
#use Data::Dumper;
|
||||
use Getopt::Long;
|
||||
@ -50,16 +51,22 @@ my $arg = shift(@SaveARGV);
|
||||
|
||||
if ($arg =~ /^-/) # no noderange
|
||||
{
|
||||
push @{$cmdref->{arg}}, $arg;
|
||||
foreach (@SAVEARGV)
|
||||
{
|
||||
push(@{$cmdref->{arg}}, $_);
|
||||
}
|
||||
@ARGV = @{$cmdref->{arg}}; # save just the argument to parse
|
||||
xCAT::MsgUtils->message(
|
||||
"I",
|
||||
"Node range not specified, see man page for syntax.\n"
|
||||
);
|
||||
exit 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cmdref->{noderange}->[0] = $arg; # save noderange
|
||||
if (!($cmdref->{noderange}->[0])) {
|
||||
xCAT::MsgUtils->message(
|
||||
"I",
|
||||
"Node range not specified, see man page for syntax.\n"
|
||||
);
|
||||
exit 1;
|
||||
}
|
||||
@ARGV = @SaveARGV; # noderange removed for parsing
|
||||
}
|
||||
|
||||
@ -77,7 +84,6 @@ foreach (@SaveARGV)
|
||||
{
|
||||
push(@{$cmdref->{arg}}, $_);
|
||||
}
|
||||
|
||||
# add environment variables, if they have not already been assigned with
|
||||
# command line flags
|
||||
if (!($::NODE_RSH))
|
||||
|
Loading…
Reference in New Issue
Block a user