diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-01-09 16:12:10 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-01-09 16:12:10 -0500 |
commit | 7a38e128564200c31a4249f9f63828b027e6b593 (patch) | |
tree | 1b758827becd3140c9ce076046bfc15b489566b2 /cobbler/action_reposync.py | |
parent | 2d710af47fa757350f999b73ca669152c6896979 (diff) | |
download | third_party-cobbler-7a38e128564200c31a4249f9f63828b027e6b593.tar.gz third_party-cobbler-7a38e128564200c31a4249f9f63828b027e6b593.tar.xz third_party-cobbler-7a38e128564200c31a4249f9f63828b027e6b593.zip |
Added a parameter --yumopts which allows setting parameters for yum plugins in a manner
similar to how --kopts and --ksmeta works.
Diffstat (limited to 'cobbler/action_reposync.py')
-rw-r--r-- | cobbler/action_reposync.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |