summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-05-13 16:04:34 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-05-13 16:04:34 -0400
commit0f60b1a19ef32c63c591905b9640ebb60684f442 (patch)
treeb3e0f528f2f17a34347af364821c9569b9ab8f8d
parent480798fdccd1d0bb5c4b160333f0933dc463053e (diff)
downloadthird_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.
-rw-r--r--CHANGELOG1
-rw-r--r--cobbler/item_system.py11
2 files changed, 7 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 1992994..079a790 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -11,6 +11,7 @@ Cobbler CHANGELOG
- setting per-system kickstart template to "" or "delete" restores inheritance
- if repos in profiles no longer exist, remove noisy warning, move to "check"
- move warning about reposync to check also (check is more useful at runtime now)
+- build pxe trees for systems even if interface0 is undefined
- Fri May 09 2008 - 0.9.1
- patch to allow yumopts to override gpgcheck
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)