From 3c37d5c25a86d092e945ad79bc5ca7a7ca174b57 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 9 Oct 2008 15:28:47 +0000 Subject: [PATCH] fixes for aix support git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2309 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/copycerts | 3 ++- xCAT-server/sbin/xcatconfig | 43 +++++++++++++++++++++---------------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/xCAT-server/sbin/copycerts b/xCAT-server/sbin/copycerts index 2892e37ba..1d9ad0943 100644 --- a/xCAT-server/sbin/copycerts +++ b/xCAT-server/sbin/copycerts @@ -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 diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 991def311..d4b007502 100644 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -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