summaryrefslogtreecommitdiffstats
path: root/cobbler/action_sync.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-08-21 14:21:22 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-08-21 14:21:22 -0400
commit5086be11c1f32056e97f356bb7675bbe060b21ad (patch)
tree16fd7e83e0dcd13df0c579b5b465cdb832ee1c77 /cobbler/action_sync.py
parent3411aa4993f0cd5391c74beee3eecbb3cec8d776 (diff)
downloadthird_party-cobbler-5086be11c1f32056e97f356bb7675bbe060b21ad.tar.gz
third_party-cobbler-5086be11c1f32056e97f356bb7675bbe060b21ad.tar.xz
third_party-cobbler-5086be11c1f32056e97f356bb7675bbe060b21ad.zip
Also check mac address against None prior to adding dhcp entry for system
that is not named after a mac address.
Diffstat (limited to 'cobbler/action_sync.py')
-rw-r--r--cobbler/action_sync.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 77c0755..a051828 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -149,7 +149,8 @@ class BootSync:
system_definitions = ""
counter = 0
for system in self.systems:
- if not system.get_mac_address() != "":
+ mac = system.get_mac_address()
+ if mac is None or mac == "":
# can't write a DHCP entry for this system
# FIXME: should this be a warning?
pass
@@ -170,7 +171,7 @@ class BootSync:
if distro.arch == "ia64":
# can't use pxelinux.0 anymore
systxt = systxt + " filename \"/%s\";\n" % elilo
- systxt = systxt + " hardware ethernet %s;\n" % system.get_mac_address()
+ systxt = systxt + " hardware ethernet %s;\n" % mac
if system.get_ip_address() != None:
systxt = systxt + " fixed-address %s;\n" % system.get_ip_address()
systxt = systxt + " next-server %s;\n" % self.settings.next_server