Conditionally doing requires for xCAT pm's
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@995 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
b8247060de
commit
9613d2f9c0
@ -4,11 +4,14 @@ package xCAT::Client;
|
||||
BEGIN
|
||||
{
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr';
|
||||
require lib;
|
||||
lib->import("$::XCATROOT/lib/perl");
|
||||
if ($ENV{XCATBYPASS}) {
|
||||
require xCAT::NodeRange;
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
}
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
require xCAT::NodeRange;
|
||||
require xCAT::Utils;
|
||||
require xCAT::Table;
|
||||
|
||||
my $inet6support;
|
||||
use IO::Socket::SSL;
|
||||
|
@ -10,7 +10,7 @@ use File::Basename;
|
||||
use Getopt::Long;
|
||||
require xCAT::MsgUtils;
|
||||
require xCAT::DSHCLI;
|
||||
require xCAT::Client;
|
||||
#require xCAT::Client; # delay the require of this until we know if -K was specified, because of XCATBYPASS mode
|
||||
my $bname = basename($0);
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -119,6 +119,7 @@ if (!($::CONTEXT_SET))
|
||||
}
|
||||
}
|
||||
|
||||
require xCAT::Client;
|
||||
xCAT::Client::submit_request($cmdref,\&xCAT::Client::handle_response);
|
||||
exit $xCAT::Client::EXITCODE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user