From 00329dcd851917b8964b2baa11ac2c418d13fbdb Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 1 Aug 2008 14:30:26 +0000 Subject: [PATCH] -Fix bug where makedhcp -a before mac table exists would result in an error git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1974 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 541aca025..3ad48c961 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -424,7 +424,11 @@ sub process_request { $req->{node} = []; my $mactab = xCAT::Table->new('mac'); - my @entries = ($mactab->getAllNodeAttribs([qw(mac)])); + + my @entries=(); + if ($mactab) { + @entries = ($mactab->getAllNodeAttribs([qw(mac)])); + } foreach (@entries) { push @{$req->{node}}, $_->{node};