summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/PostInstall.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Client/Tools/PostInstall.py')
-rw-r--r--src/lib/Client/Tools/PostInstall.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/PostInstall.py b/src/lib/Client/Tools/PostInstall.py
new file mode 100644
index 000000000..34627cacf
--- /dev/null
+++ b/src/lib/Client/Tools/PostInstall.py
@@ -0,0 +1,21 @@
+'''PostInstall Support'''
+__revision__ = '$Revision$'
+
+import Bcfg2.Client.Tools
+
+class PostInstall(Bcfg2.Client.Tools.Tool):
+ '''Implement PostInstalls'''
+ __name__ = 'PostInstall'
+ __handles__ = [('PostInstall', None)]
+ __req__ = {'PostInstall': ['name']}
+
+ def VerifyPostInstall(self, dummy, _):
+ '''PostInstalls always verify true'''
+ return True
+
+ def BundleUpdated(self, bundle):
+ '''Run postinstalls when bundles have been updated'''
+ for entry in bundle:
+ if entry.tag == 'PostInstall':
+ self.cmd.run(entry.get('name'))
+