Update other p* commands to also be sudo friendly
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11947 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
492305799b
commit
71cf318ee9
@ -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,
|
||||
);
|
||||
|
@ -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,
|
||||
);
|
||||
|
@ -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,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user