diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-08-21 14:36:20 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-08-21 14:36:20 -0400 |
commit | 0d191065bc6e293448ce3c1114b2f716a30fc4ae (patch) | |
tree | 5143ab7be4762d44693b8b4de92c1c978405db01 /cobbler/action_litesync.py | |
parent | 8bcdf9fc47e9cbc90c3a04a5a552608971d7db62 (diff) | |
download | third_party-cobbler-0d191065bc6e293448ce3c1114b2f716a30fc4ae.tar.gz third_party-cobbler-0d191065bc6e293448ce3c1114b2f716a30fc4ae.tar.xz third_party-cobbler-0d191065bc6e293448ce3c1114b2f716a30fc4ae.zip |
Bugfixing for deleting systems that are not named after MAC addresses.
Diffstat (limited to 'cobbler/action_litesync.py')
-rw-r--r-- | cobbler/action_litesync.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cobbler/action_litesync.py b/cobbler/action_litesync.py index 2560d8d..d86962f 100644 --- a/cobbler/action_litesync.py +++ b/cobbler/action_litesync.py @@ -112,15 +112,17 @@ 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 - if system_record.is_pxe_supported(): - filename = utils.get_config_filename(system_record) - self.sync.rmtree(os.path.join(self.settings.webdir, "kickstarts_sys", filename)) + system_record = self.systems.find(name=name) + filename = utils.get_config_filename(system_record) + self.sync.rmtree(os.path.join(self.settings.webdir, "kickstarts_sys", filename)) + + if not system_record.is_pxe_supported(): + # no need to go any further with PXE cleanup + return # delete PXE Linux configuration file (which might be in one of two places) itanic = False - system_record = self.systems.find(name=name) profile = self.profiles.find(name=system_record.profile) - # allow cobbler deletes to still work in the cobbler config is discombobulated if profile is not None: distro = self.distros.find(name=profile.distro) if distro is not None and distro in [ "ia64", "IA64"]: |