From 0f60b1a19ef32c63c591905b9640ebb60684f442 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 13 May 2008 16:04:34 -0400 Subject: If for some reason the user has defined a system where the first interface record is blank and the second is not, still build the PXE tree based on the second record. --- cobbler/item_system.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cobbler') diff --git a/cobbler/item_system.py b/cobbler/item_system.py index 94ec392..2318ced 100644 --- a/cobbler/item_system.py +++ b/cobbler/item_system.py @@ -229,11 +229,12 @@ class System(item.Item): """ if self.name == "default": return True - mac = self.get_mac_address(interface) - ip = self.get_ip_address(interface) - if mac is None and ip is None: - return False - return True + for (name,x) in self.interfaces.iteritems(): + mac = x.get("mac_address",None) + ip = x.get("ip_address",None) + if mac is not None or ip is not None: + return True + return False def set_dhcp_tag(self,dhcp_tag,interface="intf0"): intf = self.__get_interface(interface) -- cgit