From de0712ce32205f94f8405335749d7cc071bf94a5 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 12 Jun 2008 17:47:09 +0000 Subject: [PATCH] add AIX check around creation of authorized_keys on MN git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1638 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index c1fa746e9..bba5acd07 100644 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -452,20 +452,23 @@ if ((!-r $pubfile) || $::FORCE) ); } - # allows node be able to scp to the MN only for AIX - my $cmd = "/bin/cat $pubfile >> /.ssh/authorized_keys"; - my $outref = xCAT::Utils->runcmd("$cmd", 0); - if ($::RUNCMD_RC != 0) - { + if ($::osname eq 'AIX') + { + # allows node be able to scp to the MN only for AIX + my $cmd = "/bin/cat $pubfile >> /.ssh/authorized_keys"; + my $outref = xCAT::Utils->runcmd("$cmd", 0); + if ($::RUNCMD_RC != 0) + { xCAT::MsgUtils->message('E', "Could not cat $pubfile to /.ssh/authorized_keys.\n"); - } - else - { + } + else + { xCAT::MsgUtils->message('I', "Added $pubfile to /.ssh/authorized_keys.\n"); chmod 0600, "/.ssh/authorized_keys"; - } + } + } } }