From 7a38e128564200c31a4249f9f63828b027e6b593 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 9 Jan 2008 16:12:10 -0500 Subject: Added a parameter --yumopts which allows setting parameters for yum plugins in a manner similar to how --kopts and --ksmeta works. --- cobbler/action_reposync.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cobbler/action_reposync.py') diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index 27491fa..265bf48 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -237,12 +237,17 @@ class RepoSync: if output: line = "baseurl=http://${server}/cobbler/repo_mirror/%s\n" % (repo.name) config_file.write(line) + # user may have options specific to certain yum plugins + # add them to the file + for x in repo.yumopts: + config_file.write("%s=%s\n" % (x, repo.yumopts[x])) else: line = "baseurl=%s\n" % repo.mirror line = line.replace("@@server@@",self.settings.server) config_file.write(line) config_file.write("enabled=1\n") config_file.write("priority=%s\n" % repo.priority) + # FIXME: potentially might want a way to turn this on/off on a per-repo basis config_file.write("gpgcheck=0\n") config_file.close() return fname -- cgit