summaryrefslogtreecommitdiffstats
path: root/cobbler/action_reposync.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-11-01 18:03:25 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-11-01 18:03:25 -0400
commit7075e26adcb4f185931930c2b9489502501e12ee (patch)
tree8edee6e1e788fc083cd485716c053282146d4d05 /cobbler/action_reposync.py
parent95e5a65993da2d0b008222501c6a132bb8a3daa2 (diff)
downloadthird_party-cobbler-7075e26adcb4f185931930c2b9489502501e12ee.tar.gz
third_party-cobbler-7075e26adcb4f185931930c2b9489502501e12ee.tar.xz
third_party-cobbler-7075e26adcb4f185931930c2b9489502501e12ee.zip
Code to wire up the new --server-override to the sync code. This leaves off some of the
repo management, which will not work with --server-override completely in all cases (depending on DNS) until we do some extra post magic in our action_sync stanza generaton. Ow, my brain hurts just thinking about other people who have to read that explanation :)
Diffstat (limited to 'cobbler/action_reposync.py')
-rw-r--r--cobbler/action_reposync.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py
index 7fac220..8cd738f 100644
--- a/cobbler/action_reposync.py
+++ b/cobbler/action_reposync.py
@@ -224,6 +224,13 @@ class RepoSync:
(A) Create local files that can be used with yum on provisioned clients to make use of thisi mirror.
(B) Create a temporary file for yum to feed into reposync
"""
+
+ # FIXME: the output case will generate repo configuration files which are usable
+ # for the installed systems. They need to be made compatible with --server-override
+ # which means that we should NOT replace @@server@@ except in a dynamically generated
+ # post script that runs on each file we wget, and replace it there. Until then
+ # installed repos may require a host file setting that allows them to find the
+ # main server address used for the initial mirroring. We can clean this up :)
if output:
fname = os.path.join(dest_path,"config.repo")
@@ -234,6 +241,8 @@ class RepoSync:
config_file.write("[%s]\n" % repo.name)
config_file.write("name=%s\n" % repo.name)
if output:
+ # see note above: leave as @@server@@ and fix in %post of kickstart when
+ # we generate the stanza
line = "baseurl=http://%s/cobbler/repo_mirror/%s\n" % (self.settings.server, repo.name)
config_file.write(line)
else: