-Have Client library use a more reliable method than environment to get home directory
-Change conserver backends to not bother with setting HOME variable at all git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3045 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
56debd0d4b
commit
c8264f231a
@ -73,9 +73,10 @@ sub submit_request {
|
||||
my $keyfile = shift;
|
||||
my $certfile = shift;
|
||||
my $cafile = shift;
|
||||
unless ($keyfile) { $keyfile = $ENV{HOME}."/.xcat/client-cred.pem"; }
|
||||
unless ($certfile) { $certfile = $ENV{HOME}."/.xcat/client-cred.pem"; }
|
||||
unless ($cafile) { $cafile = $ENV{HOME}."/.xcat/ca.pem"; }
|
||||
require xCAT::Utils;
|
||||
unless ($keyfile) { $keyfile = xCAT::Utils->getHomeDir()."/.xcat/client-cred.pem"; }
|
||||
unless ($certfile) { $certfile = xCAT::Utils->getHomeDir()."/.xcat/client-cred.pem"; }
|
||||
unless ($cafile) { $cafile = xCAT::Utils->getHomeDir()."/.xcat/ca.pem"; }
|
||||
$xCAT::Client::EXITCODE = 0; # clear out exit code before invoking the plugin
|
||||
|
||||
|
||||
|
@ -37,11 +37,6 @@ BEGIN
|
||||
}
|
||||
my $sleepint=int(rand(10)); #Stagger start to avoid overwhelming conserver/xCATd
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
if ($^O =~ /^linux/i){
|
||||
$ENV{HOME}='/root/';
|
||||
} else {
|
||||
$ENV{HOME}='/';
|
||||
}
|
||||
require xCAT::Client;
|
||||
|
||||
#require xCAT::Table;
|
||||
|
@ -37,7 +37,6 @@ BEGIN
|
||||
my $sleepint=int(rand(10)); #Stagger start to avoid overwhelming conserver/xCATd
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
$ENV{HOME}='/root/';
|
||||
require xCAT::Client;
|
||||
my $username = 'USERID';
|
||||
my $password = 'PASSW0RD';
|
||||
|
@ -44,7 +44,6 @@ BEGIN
|
||||
#}
|
||||
my $sleepint;
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
$ENV{HOME}='/root/';
|
||||
require xCAT::Client;
|
||||
|
||||
require File::Basename;
|
||||
|
@ -44,7 +44,6 @@ BEGIN
|
||||
#}
|
||||
my $sleepint;
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
$ENV{HOME}='/root/';
|
||||
require xCAT::Client;
|
||||
|
||||
require File::Basename;
|
||||
|
Loading…
Reference in New Issue
Block a user