summaryrefslogtreecommitdiffstats
path: root/cobbler
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2009-08-20 13:37:48 -0400
committerMichael DeHaan <mdehaan@redhat.com>2009-08-20 13:37:48 -0400
commit227d392e7be52a4250d9e65525118c20c75a8064 (patch)
tree553911c5ea4125863a4d26439095d297702d7d29 /cobbler
parent2f8030837d5e958be9f8491d4edb1447335a9377 (diff)
downloadcobbler-227d392e7be52a4250d9e65525118c20c75a8064.tar.gz
cobbler-227d392e7be52a4250d9e65525118c20c75a8064.tar.xz
cobbler-227d392e7be52a4250d9e65525118c20c75a8064.zip
Reinstate --mac=random from the CLI or API
Diffstat (limited to 'cobbler')
-rw-r--r--cobbler/item_system.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cobbler/item_system.py b/cobbler/item_system.py
index 56ec9c3d..cb1381e0 100644
--- a/cobbler/item_system.py
+++ b/cobbler/item_system.py
@@ -276,6 +276,8 @@ class System(item.Item):
raise CX(_("invalid format for IP address (%s)") % address)
def set_mac_address(self,address,interface):
+ if address == "random":
+ address = utils.get_random_mac(self.config.api)
intf = self.__get_interface(interface)
if address == "" or utils.is_mac(address):
intf["mac_address"] = address.strip()