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
This commit is contained in:
lissav 2008-06-12 17:47:09 +00:00
parent cffdd01ede
commit de0712ce32

View File

@ -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";
}
}
}
}
}