check for existence of .ssh

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1415 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2008-05-15 18:10:48 +00:00
parent 8c66cc700a
commit 1c24958cab

View File

@ -73,18 +73,25 @@ sub setup_SSH
my $configfile;
my $cmd;
my $configinfo;
my $sshdir;
my $cmd;
# build the $HOMEROOT/.ssh/config
if (xCAT::Utils->isLinux())
{
$configfile = "/root/.ssh/config";
$sshdir="/root/.ssh";
}
else
{ #AIX
$configfile = "/.ssh/config";
$sshdir="/.ssh";
}
if (!(-e $sshdir)){ # directory does not exits
mkdir($sshdir, 0700);
}
$configinfo = "StrictHostKeyChecking no";
my $cmd;
if (-e $configfile)
{
$cmd = "grep StrictHostKeyChecking $configfile";