From 315a7fb8416168bc8539279591fc90b56810c9db Mon Sep 17 00:00:00 2001 From: loz-hurst Date: Thu, 8 Oct 2015 14:50:17 +0100 Subject: [PATCH] Stop repeating domains in domain-search Fixes issue #246. --- xCAT-server/lib/xcat/plugins/dhcp.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 0fb5d45e2..15dc06b18 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -1490,9 +1490,9 @@ sub process_request # - include the site domain - if any my $nettab = xCAT::Table->new("networks"); my @doms = $nettab->getAllAttribs('domain'); - foreach(@doms){ - if ($_->{domain}) { - push (@alldomains, $_->{domain}); + foreach my $netdom (@doms){ + if ($netdom->{domain}) { + push (@alldomains, $netdom->{domain}) unless grep(/^$netdom->{domain}$/, @alldomains); } } $nettab->close;