From 43309df2d1dcf3683793eeaa26c84d6c6c97e4ca Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 Jan 2020 09:40:24 -0500 Subject: [PATCH] Move the entries and t_entry to a useful scope It was not correctly made available to code that needed it. --- xCAT-server/lib/xcat/plugins/dhcp.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index f2e0b0898..8b4777c33 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -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");