From 1c24958cabfa2aaf3815b741b202b52b6c731b0f Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 15 May 2008 18:10:48 +0000 Subject: [PATCH] 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 --- xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm b/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm index c6c184a3e..cbc2fbb6a 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm @@ -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";