From 5f0e5dad2b7eab7c4097de6dcd2e80c401280227 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 7 Oct 2008 16:40:00 +0000 Subject: [PATCH] fix setup of service node dhcp based on site table input of dhcpinterfaces git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2291 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 09527a93b..fd02fa82c 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -320,12 +320,21 @@ sub process_request my $dhcpinterfaces = $href->{value}; my $dhcpif; INTF: foreach $dhcpif (split /;/,$dhcpinterfaces) { + my $host; + my $savehost; if ($dhcpif =~ /\|/) { (my $ngroup,$dhcpif) = split /\|/,$dhcpif; - my $host; foreach $host (noderange($ngroup)) { + $savehost=$host; if (xCAT::Utils->thishostisnot($host)) { + + next INTF; + } + } + if (!defined($savehost)) { # host not defined in db, + # probably management node + if (xCAT::Utils->thishostisnot($ngroup)) { next INTF; } }