summaryrefslogtreecommitdiffstats
path: root/cobbler/collection_distros.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-06-06 17:53:24 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-06-06 17:53:24 -0400
commit3673e98fdf97f77c2f66d5c14e60dddc5b1fe349 (patch)
treefb9a8bc429abbaf069bea62cf2aeb7cd62dd1e72 /cobbler/collection_distros.py
parentec14d428ffafee3e4fa0b549e26c74028b67313e (diff)
downloadthird_party-cobbler-3673e98fdf97f77c2f66d5c14e60dddc5b1fe349.tar.gz
third_party-cobbler-3673e98fdf97f77c2f66d5c14e60dddc5b1fe349.tar.xz
third_party-cobbler-3673e98fdf97f77c2f66d5c14e60dddc5b1fe349.zip
This is Adam Rosenwald's patch for seperating triggers into pre and post
triggers, plus my modifications to make them deal with return codes.
Diffstat (limited to 'cobbler/collection_distros.py')
-rw-r--r--cobbler/collection_distros.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cobbler/collection_distros.py b/cobbler/collection_distros.py
index 3fe45ed..4b88002 100644
--- a/cobbler/collection_distros.py
+++ b/cobbler/collection_distros.py
@@ -52,9 +52,10 @@ class Distros(collection.Collection):
raise CX(_("removal would orphan profile: %s") % v.name)
if self.find(name):
if with_delete:
+ self._run_triggers(self.listing[name], "/var/lib/cobbler/triggers/delete/distro/pre/*")
lite_sync = action_litesync.BootLiteSync(self.config)
lite_sync.remove_single_profile(name)
- self._run_triggers(self.listing[name], "/var/lib/cobbler/triggers/delete/distro/*")
+ self._run_triggers(self.listing[name], "/var/lib/cobbler/triggers/delete/distro/post/*")
del self.listing[name]
return True
raise CX(_("cannot delete object that does not exist"))