diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-11-14 10:20:15 -0500 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-11-14 10:20:15 -0500 |
commit | e8098467001523a137bc8b6a0366f7fa400e10c1 (patch) | |
tree | e4e8f88a98f13c5c88f37c34d1a3c5cb63aefba0 /cobbler/action_sync.py | |
parent | 6f6ec085d59fd9ab050dca376f16d7736c290d61 (diff) | |
download | third_party-cobbler-e8098467001523a137bc8b6a0366f7fa400e10c1.tar.gz third_party-cobbler-e8098467001523a137bc8b6a0366f7fa400e10c1.tar.xz third_party-cobbler-e8098467001523a137bc8b6a0366f7fa400e10c1.zip |
During "cobbler sync" only delete certain directories in /tftpboot to preserve /tftpboot for
other potential uses.
Diffstat (limited to 'cobbler/action_sync.py')
-rw-r--r-- | cobbler/action_sync.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index e007a77..01a8389 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -186,14 +186,17 @@ class BootSync: """ # clean out all of /tftpboot - for tree in (self.settings.tftpboot, self.settings.webdir): - for x in os.listdir(tree): - path = os.path.join(tree,x) - if os.path.isfile(path): - self.rmfile(path) - if os.path.isdir(path): - if not x == "localmirror": - self.rmtree(path) + for x in os.listdir(self.settings.webdir): + path = os.path.join(self.settings.webdir,x) + if os.path.isfile(path): + self.rmfile(path) + if os.path.isdir(path): + if not x == "localmirror": + self.rmtree(path) + self.rmtree(os.path.join(self.settings.tftpboot, "pxelinux.cfg")) + self.rmtree(os.path.join(self.settings.tftpboot, "images")) + self.rmfile(os.path.join(self.settings.tftpboot, "pxelinux.0")) + self.rmfile(os.path.join(self.settings.tftpboot, "elilo-3.6-ia64.efi")) # make some directories in /tftpboot for x in ["pxelinux.cfg","images"]: |