diff options
author | mdehaan@mdehaan.rdu.redhat.com <> | 2006-12-20 12:23:53 -0500 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-12-20 12:23:53 -0500 |
commit | 7e3aafc03785e709c361f278e75f280debafbe14 (patch) | |
tree | 31f6113306a9054c4268495da37c5f758e5f93e1 /cobbler/action_reposync.py | |
parent | 75e98c071df3a4a06354f2b2b8c48cb14e8592e3 (diff) | |
download | third_party-cobbler-7e3aafc03785e709c361f278e75f280debafbe14.tar.gz third_party-cobbler-7e3aafc03785e709c361f278e75f280debafbe14.tar.xz third_party-cobbler-7e3aafc03785e709c361f278e75f280debafbe14.zip |
Keep repo representation as strings.
Also, add trailing / to rsync URL's to always to prevent user mistakes, which allows us to know where the repomd
data files are.
Diffstat (limited to 'cobbler/action_reposync.py')
-rw-r--r-- | cobbler/action_reposync.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index 96d35f3..2aeffd1 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -69,11 +69,12 @@ class RepoSync: if not repo.keep_updated: print "- %s is set to not be updated" return True - print "imagine an rsync happened here, and that it was amazing..." dest_path = os.path.join(self.settings.webdir, "repo_mirror", repo.name) spacer = "" if repo.mirror.find("rsync://") != -1: spacer = "-e ssh" + if not repo.mirror.endswith("/"): + repo.mirror = "%s/" % repo.mirror cmd = "rsync -av %s --delete --delete-excluded --exclude-from=/etc/cobbler/rsync.exclude %s %s" % (spacer, repo.mirror, dest_path) print "executing: %s" % cmd rc = sub_process.call(cmd, shell=True) |