fixes for aix support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2309 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
67c7165717
commit
3c37d5c25a
@ -38,7 +38,8 @@ exit 0;
|
||||
Copy from the mounted /xcatpost/ directory to the MS /install/postscripts
|
||||
directory the /install/postscripts/ca install/postscripts/cert and
|
||||
/install/postscripts/_xcat into the local file system. These certificate are
|
||||
needed for the postresql db setup for the service node to be able to access
|
||||
needed for the postresql and mysql db setup for the service node
|
||||
to be able to access
|
||||
the DB from the service node.
|
||||
|
||||
=cut
|
||||
|
@ -397,7 +397,7 @@ if (!-d "/install/postscripts/_ssh")
|
||||
}
|
||||
|
||||
#
|
||||
# Generate id_rsa.pub
|
||||
# Generate id_rsa.pub, if it does not exist or the force option
|
||||
#
|
||||
my $pubfile = "$::root/.ssh/id_rsa.pub";
|
||||
my $rsafile = "$::root/.ssh/id_rsa";
|
||||
@ -434,24 +434,6 @@ if ((!-r $pubfile) || $::FORCE)
|
||||
{
|
||||
xCAT::MsgUtils->message('I', "Generated $pubfile.\n");
|
||||
|
||||
# copy it for install on node
|
||||
my $cmd = "/bin/cp $pubfile /install/postscripts/_ssh/authorized_keys";
|
||||
my $outref = xCAT::Utils->runcmd("$cmd", 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message(
|
||||
'E',
|
||||
"Could not copy $pubfile to /install/postscripts/_ssh/authorized_keys.\n"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
xCAT::MsgUtils->message(
|
||||
'I',
|
||||
"Copied $pubfile to /install/postscripts/_ssh/authorized_keys.\n"
|
||||
);
|
||||
}
|
||||
|
||||
if ($::osname eq 'AIX')
|
||||
{
|
||||
# allows node be able to scp to the MN only for AIX
|
||||
@ -471,6 +453,29 @@ if ((!-r $pubfile) || $::FORCE)
|
||||
}
|
||||
}
|
||||
}
|
||||
# copy authorized_keys for install on node
|
||||
if (-r $pubfile) {
|
||||
my $cmd = "/bin/cp $pubfile /install/postscripts/_ssh/authorized_keys";
|
||||
my $outref = xCAT::Utils->runcmd("$cmd", 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message(
|
||||
'E',
|
||||
"Could not copy $pubfile to /install/postscripts/_ssh/authorized_keys.\n"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
xCAT::MsgUtils->message(
|
||||
'I',
|
||||
"Copied $pubfile to /install/postscripts/_ssh/authorized_keys.\n"
|
||||
);
|
||||
}
|
||||
} else {
|
||||
xCAT::MsgUtils->message( 'E',
|
||||
"Could not copy $pubfile to /install/postscripts/_ssh/authorized_keys,because $pubfile does not exist.\n"
|
||||
);
|
||||
}
|
||||
|
||||
#
|
||||
# create /var/log/consoles if needed
|
||||
|
Loading…
Reference in New Issue
Block a user