If you would like to use this patch, you will have to rebuild with the
following changes to the specfile and setup.py:
--- cobbler.spec.orig 2007-04-26 22:03:04.000000000 +0000
+++ cobbler.spec 2007-06-04 23:35:23.000000000 +0000
@@ -105,14 +105,22 @@
%dir /var/log/cobbler/syslog
%defattr(2550,root,root)
%dir /var/lib/cobbler
-%dir /var/lib/cobbler/triggers/add/distro
-%dir /var/lib/cobbler/triggers/add/profile
-%dir /var/lib/cobbler/triggers/add/system
-%dir /var/lib/cobbler/triggers/add/repo
-%dir /var/lib/cobbler/triggers/delete/distro
-%dir /var/lib/cobbler/triggers/delete/profile
-%dir /var/lib/cobbler/triggers/delete/system
-%dir /var/lib/cobbler/triggers/delete/repo
+%dir /var/lib/cobbler/triggers/add/distro/pre
+%dir /var/lib/cobbler/triggers/add/distro/post
+%dir /var/lib/cobbler/triggers/add/profile/pre
+%dir /var/lib/cobbler/triggers/add/profile/post
+%dir /var/lib/cobbler/triggers/add/system/pre
+%dir /var/lib/cobbler/triggers/add/system/post
+%dir /var/lib/cobbler/triggers/add/repo/pre
+%dir /var/lib/cobbler/triggers/add/repo/post
+%dir /var/lib/cobbler/triggers/delete/distro/pre
+%dir /var/lib/cobbler/triggers/delete/distro/post
+%dir /var/lib/cobbler/triggers/delete/profile/pre
+%dir /var/lib/cobbler/triggers/delete/profile/post
+%dir /var/lib/cobbler/triggers/delete/system/pre
+%dir /var/lib/cobbler/triggers/delete/system/post
+%dir /var/lib/cobbler/triggers/delete/repo/pre
+%dir /var/lib/cobbler/triggers/delete/repo/post
/var/lib/cobbler/elilo-3.6-ia64.efi
/var/lib/cobbler/menu.c32
%defattr(-,root,root)
--- setup.py.orig 2007-04-26 18:03:12.000000000 -0400
+++ setup.py 2007-06-04 22:05:22.000000000 -0400
@@ -78,14 +78,22 @@
(vw_links, []),
(tftp_cfg, []),
(tftp_images, []),
- ("/var/lib/cobbler/triggers/add/distro", []),
- ("/var/lib/cobbler/triggers/add/profile", []),
- ("/var/lib/cobbler/triggers/add/system", []),
- ("/var/lib/cobbler/triggers/add/repo", []),
- ("/var/lib/cobbler/triggers/delete/distro", []),
- ("/var/lib/cobbler/triggers/delete/profile", []),
- ("/var/lib/cobbler/triggers/delete/system", []),
- ("/var/lib/cobbler/triggers/delete/repo", [])
+ ("/var/lib/cobbler/triggers/add/distro/pre", []),
+ ("/var/lib/cobbler/triggers/add/distro/post", []),
+ ("/var/lib/cobbler/triggers/add/profile/pre", []),
+ ("/var/lib/cobbler/triggers/add/profile/post", []),
+ ("/var/lib/cobbler/triggers/add/system/pre", []),
+ ("/var/lib/cobbler/triggers/add/system/post", []),
+ ("/var/lib/cobbler/triggers/add/repo/pre", []),
+ ("/var/lib/cobbler/triggers/add/repo/post", []),
+ ("/var/lib/cobbler/triggers/delete/distro/pre", []),
+ ("/var/lib/cobbler/triggers/delete/distro/post", []),
+ ("/var/lib/cobbler/triggers/delete/profile/pre", []),
+ ("/var/lib/cobbler/triggers/delete/profile/post", []),
+ ("/var/lib/cobbler/triggers/delete/system/pre", []),
+ ("/var/lib/cobbler/triggers/delete/system/post", []),
+ ("/var/lib/cobbler/triggers/delete/repo/pre", [])
+ ("/var/lib/cobbler/triggers/delete/repo/post", [])
],
description = SHORT_DESC,
long_description = LONG_DESC
The actual core patches are listed below
--- cobbler/collection_distros.py.orig 2007-04-16 15:57:29.000000000 -0400
+++ cobbler/collection_distros.py 2007-06-04 21:38:33.000000000 -0400
@@ -51,9 +51,10 @@
raise cexceptions.CobblerException("orphan_profile",v.name
<http://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 cexceptions.CobblerException("delete_nothing")
--- cobbler/collection_profiles.py.orig 2007-04-16 15:07:37.000000000
-0400
+++ cobbler/collection_profiles.py 2007-06-04 21:39:01.000000000 -0400
@@ -48,9 +48,10 @@
raise cexceptions.CobblerException("orphan_system",v.name <http://v.name>)
if self.find(name):
if with_delete:
+ self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/profile/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/profile/*")
+ self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/profile/post/*")
del self.listing[name]
return True
raise cexceptions.CobblerException("delete_nothing")
--- cobbler/collection_systems.py.orig 2007-04-16 15:07:47.000000000 -0400
+++ cobbler/collection_systems.py 2007-06-04 21:41:11.000000000 -0400
@@ -49,9 +49,10 @@
"""
if self.find(name):
if with_delete:
+ self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/system/pre/*")
lite_sync = action_litesync.BootLiteSync(self.config)
lite_sync.remove_single_system(name)
- self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/system/*")
+ self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/system/post/*")
del self.listing[name]
return True
raise cexceptions.CobblerException("delete_nothing")
--- cobbler/collection_repos.py.orig 2007-04-20 18:54:24.000000000 -0400
+++ cobbler/collection_repos.py 2007-06-04 21:40:25.000000000 -0400
@@ -52,8 +52,9 @@
# but is left in for consistancy in the API.
if self.find(name):
- self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/repo/*")
+ self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/repo/pre/*")
del self.listing[name]
+ self._run_triggers(self.listing[name],
"/var/lib/cobbler/triggers/delete/repo/post/*")
return True
raise cexceptions.CobblerException("delete_nothing")
--- cobbler/collection.py.orig 2007-04-20 16:14:52.000000000 -0400
+++ cobbler/collection.py 2007-06-04 21:35:46.000000000 -0400
@@ -91,6 +91,7 @@
# perform filesystem operations
if with_copy:
+ self._run_triggers(ref,"/var/lib/cobbler/triggers/add/%s/pre/*" %
self.collection_type())
lite_sync = action_litesync.BootLiteSync(self.config)
if isinstance(ref, item_system.System):
lite_sync.add_single_system(ref.name <http://ref.name>)
@@ -103,8 +104,8 @@
# save the tree, so if neccessary, scripts can examine it.
self.config.api.serialize()
-
- self._run_triggers(ref,"/var/lib/cobbler/triggers/add/%s/*" %
self.collection_type())
+
+ self._run_triggers(ref,"/var/lib/cobbler/triggers/add/%s/post/*" %
self.collection_type())
return True
--Adam.
------------------------------------------------------------------------
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools