2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-06 18:28:16 +00:00

Move the entries and t_entry to a useful scope

It was not correctly made available to
code that needed it.
This commit is contained in:
Jarrod Johnson
2020-01-13 09:40:24 -05:00
parent e9dc40717e
commit 43309df2d1

View File

@@ -1563,6 +1563,8 @@ sub process_request
my %activenics;
my $querynics = 1;
my @entries = xCAT::TableUtils->get_site_attribute("dhcpinterfaces");
my $t_entry = $entries[0];
if (xCAT::Utils->isServiceNode() and $dhcpinterfaces and $dhcpinterfaces->{dhcpinterfaces}) {
# The keyword 'noboot' was appended to the NICs that doesn't need to reply DHCP configuration file, only used for mknb at present.
$dhcpinterfaces->{dhcpinterfaces} =~ s/:noboot//g;
@@ -1574,8 +1576,6 @@ sub process_request
}
else
{
my @entries = xCAT::TableUtils->get_site_attribute("dhcpinterfaces");
my $t_entry = $entries[0];
unless (defined($t_entry))
{ #LEGACY: singular keyname for old style site value
@entries = xCAT::TableUtils->get_site_attribute("dhcpinterface");