From 539f37f3919efdfe272f66a85f9de37e92d95001 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 24 Feb 2014 11:39:36 -0500 Subject: [PATCH] xdsh -K support (still need to do hierarchy) --- xCAT-server/lib/xcat/plugins/zone.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zone.pm b/xCAT-server/lib/xcat/plugins/zone.pm index 85c026448..c56b70acc 100644 --- a/xCAT-server/lib/xcat/plugins/zone.pm +++ b/xCAT-server/lib/xcat/plugins/zone.pm @@ -66,7 +66,7 @@ sub process_request my $command = $request->{command}->[0]; my $rc=0; # the directory which will contain the zone keys - my $keydir="/etc/xcat/sshkeydir/"; + my $keydir="/etc/xcat/sshkeys/"; # check if Management Node, if not error unless (xCAT::Utils->isMN()) @@ -271,6 +271,7 @@ sub mkzone # Create path to generated ssh keys $keydir .= $request->{zonename}; + $keydir .= "/.ssh"; # update the zone table @@ -394,7 +395,7 @@ sub usage =head3 - generate the ssh keys and store them in /etc/xcat/sshkeys/ + generate the ssh keys and store them in /etc/xcat/sshkeys//.ssh =cut @@ -459,7 +460,9 @@ sub updatezonetable my %xcatdefaultzone; $xcatdefaultzone{defaultzone} ="yes"; $xcatdefaultzone{sshbetweennodes} ="yes"; - $xcatdefaultzone{sshkeydir} ="~/.ssh"; + my $roothome = xCAT::Utils->getHomeDir("root"); + $roothome .="\/.ssh"; + $xcatdefaultzone{sshkeydir} =$roothome; $tab->setAttribs({zonename => "xcatdefault"}, \%xcatdefaultzone); }