From 2c12505a112dc6d2463458ff2af2bc1ca0b6a8d6 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Tue, 19 Aug 2014 00:25:42 -0700 Subject: [PATCH] fix bug 4251:nodeset return xnba plugin bug, pid 657 when node mac is not defined --- xCAT-server/lib/perl/xCAT/Template.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index ae0002204..567efaff9 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -690,9 +690,9 @@ sub kickstartnetwork { my $line = "network --onboot=yes --bootproto="; my $hoststab; my $mactab = xCAT::Table->new('mac',-create=>0); - unless ($mactab) { die "mac table should always exist prior to template processing when doing autoula"; } + unless ($mactab) { $tmplerr ="mac table should always exist prior to template processing when doing autoula"; return;} my $ent = $mactab->getNodeAttribs($node,['mac'],prefetchcache=>1); - unless ($ent and $ent->{mac}) { die "missing mac data for $node"; } + unless ($ent and $ent->{mac}) { $tmplerr ="missing mac data for $node"; return;} my $suffix = $ent->{mac}; $suffix = lc($suffix); if ($::XCATSITEVALS{managedaddressmode} eq "autoula") {