changes for multi-domain support

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14229 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2012-11-02 14:01:38 +00:00
parent e352c14b74
commit 2507fafbb4

View File

@ -252,17 +252,18 @@ sub add_known_host
if (defined $hostname)
{
my $sitedomain;
my @domain = xCAT::TableUtils->get_site_attribute("domain");
if ($domain[0])
{
$sitedomain = $domain[0];
}
my $hostdomain;
my @hosts;
push (@hosts, $hostname);
my $nd = xCAT::NetworkUtils->getNodeDomains(\@hosts);
my %nodedomains = %$nd;
$hostdomain = $nodedomains{$hostname};
$line = "\"";
$line .= "$hostname,";
if ($sitedomain)
if ($hostdomain)
{
$line .= "$hostname.$sitedomain,";
$line .= "$hostname.$hostdomain,";
}
$line .= "$ip_address";
$line .= " ";