From 7075e26adcb4f185931930c2b9489502501e12ee Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 1 Nov 2007 18:03:25 -0400 Subject: 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 :) --- cobbler/action_reposync.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cobbler/action_reposync.py') 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: -- cgit