summaryrefslogtreecommitdiffstats
path: root/cobbler
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-02-19 16:51:17 -0500
committerJim Meyering <jim@meyering.net>2007-02-19 16:51:17 -0500
commit978103bc2e95d16f840c98a337f170ecaf3771c2 (patch)
tree62a39e4c02b717c4620c15be889eae980e64d391 /cobbler
parent5a186d963ae3c89af01bdc71be0c73f294463c38 (diff)
downloadthird_party-cobbler-978103bc2e95d16f840c98a337f170ecaf3771c2.tar.gz
third_party-cobbler-978103bc2e95d16f840c98a337f170ecaf3771c2.tar.xz
third_party-cobbler-978103bc2e95d16f840c98a337f170ecaf3771c2.zip
Fixes to work with older versions of Cheetah, small fix to system delete code so it deletes the right file in kickstarts_sys.
Diffstat (limited to 'cobbler')
-rw-r--r--cobbler/action_litesync.py4
-rw-r--r--cobbler/action_sync.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/cobbler/action_litesync.py b/cobbler/action_litesync.py
index d9d2e4a..4f9195c 100644
--- a/cobbler/action_litesync.py
+++ b/cobbler/action_litesync.py
@@ -107,9 +107,9 @@ class BootLiteSync:
# delete system YAML file in systems/$name in webdir
self.sync.rmfile(os.path.join(self.settings.webdir, "systems", name))
# delete contents of kickstarts_sys/$name in webdir
- self.sync.rmtree(os.path.join(self.settings.webdir, "kickstarts_sys", name))
+ filename = self.sync.get_pxe_filename(name)
+ self.sync.rmtree(os.path.join(self.settings.webdir, "kickstarts_sys", filename))
# delete pxelinux.cfg/$foo where $foo is either the *encoded* IP
# or the MAC or default
- filename = self.sync.get_pxe_filename(name)
self.sync.rmfile(os.path.join(self.settings.tftpboot, "pxelinux.cfg", filename))
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 89e9978..a728865 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -295,6 +295,7 @@ class BootSync:
"""
# copy is a 4-letter word but tftpboot runs chroot, thus it's required.
for d in self.distros:
+ print "sync distro: %s" % d.name
self.copy_single_distro_files(d)
def copy_single_distro_files(self, d):
@@ -340,6 +341,7 @@ class BootSync:
"""
for g in self.profiles:
+ print "sync profile: %s" % g.name
self.validate_kickstart_for_specific_profile(g)
def validate_kickstart_for_specific_profile(self,g):
@@ -414,6 +416,7 @@ class BootSync:
"""
for s in self.systems:
+ print "sync system: %s" % s.name
self.validate_kickstart_for_specific_system(s)
def validate_kickstart_for_specific_system(self,s):
@@ -462,7 +465,7 @@ class BootSync:
data = "#errorCatcher Echo\n" + data
- t = Template(source=data, searchList=metadata)
+ t = Template(source=data, searchList=[metadata])
data_out = str(t)
self.mkdir(os.path.basename(out_path))
fd = open(out_path, "w+")