Update other p* commands to also be sudo friendly

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@11965 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-03-23 12:56:06 +00:00
parent 7bed33128a
commit 82c5ed555f
3 changed files with 17 additions and 9 deletions

View File

@ -72,11 +72,14 @@ unless (@ARGV) {
## Connect to xcatd to expand a noderange
my $noderange = $ARGV[0];
my @user = getpwuid($>);
my $homedir=$user[7];
my $client = IO::Socket::SSL->new(
PeerAddr=>$xcathost,
SSL_key_file=>$ENV{HOME}."/.xcat/client-cred.pem",
SSL_cert_file=>$ENV{HOME}."/.xcat/client-cred.pem",
SSL_ca_file => $ENV{HOME}."/.xcat/ca.pem",
SSL_key_file=>$homedir."/.xcat/client-cred.pem",
SSL_cert_file=>$homedir."/.xcat/client-cred.pem",
SSL_ca_file => $homedir."/.xcat/ca.pem",
SSL_use_cert => 1,
#SSL_verify_mode => 1,
);

View File

@ -54,11 +54,13 @@ if ($version) {
}
(my $noderange,my $destloc) = split(/:/,$ARGV[1]);
my @user = getpwuid($>);
my $homedir=$user[7];
my $client = IO::Socket::SSL->new(
PeerAddr=>$xcathost,
SSL_key_file=>$ENV{HOME}."/.xcat/client-cred.pem",
SSL_cert_file=>$ENV{HOME}."/.xcat/client-cred.pem",
SSL_ca_file => $ENV{HOME}."/.xcat/ca.pem",
SSL_key_file=>$homedir."/.xcat/client-cred.pem",
SSL_cert_file=>$homedir."/.xcat/client-cred.pem",
SSL_ca_file => $homedir."/.xcat/ca.pem",
SSL_use_cert => 1,
#SSL_verify_mode => 1,
);

View File

@ -47,11 +47,14 @@ my $noderange, $destloc;
if ($dest =~ /:/) { ($noderange, $destloc) = split(/:/, $dest); }
else { usage("No node range specified\n\n"); }
my @user = getpwuid($>);
my $homedir=$user[7];
my $client = IO::Socket::SSL->new(
PeerAddr=>$xcathost,
SSL_key_file=>$ENV{HOME}."/.xcat/client-cred.pem",
SSL_cert_file=>$ENV{HOME}."/.xcat/client-cred.pem",
SSL_ca_file => $ENV{HOME}."/.xcat/ca.pem",
SSL_key_file=>$homedir."/.xcat/client-cred.pem",
SSL_cert_file=>$homedir."/.xcat/client-cred.pem",
SSL_ca_file => $homedir."/.xcat/ca.pem",
SSL_use_cert => 1,
#SSL_verify_mode => 1,
);