From 4fcfce9f722961c6b20ee6cec3eb196f618b7a2e Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 9 Feb 2007 09:46:09 -0500 Subject: Added an optional --breed parameter for "distro add" that supports usage of a SuSE answer file (needs testing) and can make way for other distros. koan needs to detect when it's been given a non-redhat based distro and not do anything, though cobbler PXE should work in both cases. --- cobbler/action_sync.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cobbler/action_sync.py') diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index 9cdb9c1..c1e68a3 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -352,7 +352,7 @@ class BootSync: ) self.mkdir(copy_path) dest = os.path.join(copy_path, "ks.cfg") - print "ks copy: %s -> %s" % (kickstart_path, dest) + # print "ks copy: %s -> %s" % (kickstart_path, dest) try: meta = self.blend_options(False, ( distro.ks_meta, @@ -600,7 +600,10 @@ class BootSync: if kickstart_path.startswith("/") or kickstart_path.find("/cobbler/kickstarts/") != -1: pxe_fn = self.get_pxe_filename(system.name) kickstart_path = "http://%s/cobbler_track/kickstarts_sys/%s/ks.cfg" % (self.settings.server, pxe_fn) - append_line = "%s ks=%s" % (append_line, kickstart_path) + if distro.breed is None or distro.breed == "redhat": + append_line = "%s ks=%s" % (append_line, kickstart_path) + elif distro.breed == "suse": + append_line = "%s autoyast=%s" % (append_line, kickstart_path) # now to add the append line to the file if not is_ia64: -- cgit