From edb97dc0f1f30d7d8b09b6cd253945c09c5d6f4e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 28 Mar 2017 09:28:20 -0400 Subject: [PATCH] Fix if macdata does not exist If macdata undefined, it took out all of inventory. --- xCAT-server/lib/xcat/plugins/ipmi.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 7031c41bf..ebc84ed99 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -4107,7 +4107,7 @@ sub parseboard { my $macdata = $boardinf{extra}->[6]->{value}; my $macstring = "1"; my $macprefix; - while ($macstring !~ /00:00:00:00:00:00/ and not ref $global_sessdata->{currmacs}) { + while ($macdata and $macstring !~ /00:00:00:00:00:00/ and not ref $global_sessdata->{currmacs}) { my @currmac = splice @$macdata, 0, 6; unless ((scalar @currmac) == 6) { last;