summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-10-19 16:44:06 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-10-19 16:44:06 -0400
commit1b1222ec7f95a773fcab39bf1ebe68da198919be (patch)
treeb180dc9a976886f143d0743cd725d3ec5bd3c707 /setup.py
parentd09c20fc07efb87cffcbac467f189e312eb67e9e (diff)
downloadthird_party-cobbler-1b1222ec7f95a773fcab39bf1ebe68da198919be.zip
third_party-cobbler-1b1222ec7f95a773fcab39bf1ebe68da198919be.tar.gz
third_party-cobbler-1b1222ec7f95a773fcab39bf1ebe68da198919be.tar.xz
Service restarting has been abstracted out of the action_sync code, and is now a trigger.
This commit adds pre/post sync triggers, for scripting of arbitrary actions. The idea is that a cobbler user can now modify the restart-services script to rsync DHCP configurations to a remote box and instead restart them there, for hosting DHCP on a different box. Or do anything else that might be required. The restart-services trigger will ship in the cobbler RPM. Users can modify it at will and it is marked as config(noreplace) so upgrades will not affect it.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py36
1 files changed, 20 insertions, 16 deletions
diff --git a/setup.py b/setup.py
index d064388..f094d8b 100644
--- a/setup.py
+++ b/setup.py
@@ -15,6 +15,7 @@ if __name__ == "__main__":
manpath = "share/man/man1/"
cobpath = "/var/lib/cobbler/"
backpath = "/var/lib/cobbler/backup/"
+ trigpath = "/var/lib/cobbler/triggers/"
etcpath = "/etc/cobbler/"
wwwconf = "/etc/httpd/conf.d/"
wwwpath = "/var/www/cobbler/"
@@ -168,22 +169,25 @@ if __name__ == "__main__":
(wwwgfx, ['webui_content/cobblerweb.css']),
# Directories to hold cobbler triggers
- ("/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", [])
+ ("%sadd/distro/pre" % trigpath, []),
+ ("%sadd/distro/post" % trigpath, []),
+ ("%sadd/profile/pre" % trigpath, []),
+ ("%sadd/profile/post" % trigpath, []),
+ ("%sadd/system/pre" % trigpath, []),
+ ("%sadd/system/post" % trigpath, []),
+ ("%sadd/repo/pre" % trigpath, []),
+ ("%sadd/repo/post" % trigpath, []),
+ ("%sdelete/distro/pre" % trigpath, []),
+ ("%sdelete/distro/post" % trigpath, []),
+ ("%sdelete/profile/pre" % trigpath, []),
+ ("%sdelete/profile/post" % trigpath, []),
+ ("%sdelete/system/pre" % trigpath, []),
+ ("%sdelete/system/post" % trigpath, []),
+ ("%sdelete/repo/pre" % trigpath, []),
+ ("%sdelete/repo/post" % trigpath, []),
+ ("%sdelete/repo/post" % trigpath, []),
+ ("%ssync/pre" % trigpath, []),
+ ("%ssync/post" % trigpath, [ "triggers/restart-services.trigger" ])
],
description = SHORT_DESC,
long_description = LONG_DESC