From c9b4a6c15d9169ac049229f1b5e36e2c57bd8198 Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 14 Feb 2012 07:50:00 +0000 Subject: [PATCH] add the long hostname into knownhosts file git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11570 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/makeknownhosts.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/makeknownhosts.pm b/xCAT-server/lib/xcat/plugins/makeknownhosts.pm index 54c3cf187..7b004a433 100644 --- a/xCAT-server/lib/xcat/plugins/makeknownhosts.pm +++ b/xCAT-server/lib/xcat/plugins/makeknownhosts.pm @@ -252,8 +252,18 @@ sub add_known_host if (defined $hostname) { + my $sitedomain; + my @domain = xCAT::Utils->get_site_attribute("domain"); + if ($domain[0]) + { + $sitedomain = $domain[0]; + } $line = "\""; $line .= "$hostname,"; + if ($sitedomain) + { + $line .= "$hostname.$sitedomain,"; + } $line .= "$ip_address"; $line .= " "; $line .= $output[0];