-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:
jbjohnso 2009-03-30 14:19:17 +00:00
parent 56debd0d4b
commit c8264f231a
5 changed files with 4 additions and 11 deletions

View File

@ -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

View File

@ -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;

View File

@ -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';

View File

@ -44,7 +44,6 @@ BEGIN
#}
my $sleepint;
use lib "$::XCATROOT/lib/perl";
$ENV{HOME}='/root/';
require xCAT::Client;
require File::Basename;

View File

@ -44,7 +44,6 @@ BEGIN
#}
my $sleepint;
use lib "$::XCATROOT/lib/perl";
$ENV{HOME}='/root/';
require xCAT::Client;
require File::Basename;