Hi, This patch adds interface to macaddress resolution for RedHat and SuSE systems in buildiso (ksdevice and netdevice keywords). Often you know the proper macaddress but not the interface name upfront, so this should make things a bit more reliable. In previous cobbler releases this feature was already present (for RedHat only), but it got lost somewhere when i rewrote a big portion of the buildiso code.
Grtz, Jörgen Maas
From 9d3d5eb4fbf35de111f1d86f028d0a3ef0ef5051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rgen=20Maas?= <jorgen.m...@gmail.com> Date: Fri, 19 Aug 2011 18:22:40 +0200 Subject: [PATCH 4/5] Buildiso: add interface to macaddr resolution. --- cobbler/action_buildiso.py | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cobbler/action_buildiso.py b/cobbler/action_buildiso.py index a158451..239c4ed 100644 --- a/cobbler/action_buildiso.py +++ b/cobbler/action_buildiso.py @@ -304,9 +304,15 @@ class BuildIso: # add information to the append_line if my_int is not None: if dist.breed == "suse": - append_line += " netdevice=%s" % my_int + if data.has_key("mac_address_" + my_int) and data["mac_address_" + my_int] != "": + append_line += " netdevice=%s" % data["mac_address_" + my_int] + else: + append_line += " netdevice=%s" % my_int if dist.breed == "redhat": - append_line += " ksdevice=%s" % my_int + if data.has_key("mac_address_" + my_int) and data["mac_address_" + my_int] != "": + append_line += " ksdevice=%s" % data["mac_address_" + my_int] + else: + append_line += " ksdevice=%s" % my_int if dist.breed in ["ubuntu","debian"]: append_line += " netcfg/choose_interface=%s" % my_int -- 1.7.6
_______________________________________________ cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler-devel