diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-05-13 16:04:34 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-05-13 16:04:34 -0400 |
commit | 0f60b1a19ef32c63c591905b9640ebb60684f442 (patch) | |
tree | b3e0f528f2f17a34347af364821c9569b9ab8f8d /cobbler | |
parent | 480798fdccd1d0bb5c4b160333f0933dc463053e (diff) | |
download | third_party-cobbler-0f60b1a19ef32c63c591905b9640ebb60684f442.tar.gz third_party-cobbler-0f60b1a19ef32c63c591905b9640ebb60684f442.tar.xz third_party-cobbler-0f60b1a19ef32c63c591905b9640ebb60684f442.zip |
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.
Diffstat (limited to 'cobbler')
-rw-r--r-- | cobbler/item_system.py | 11 |
1 files changed, 6 insertions, 5 deletions
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) |