From 7beb2f08d8dab26d9fe34235c91c1b2a7a2794bd Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 6 Oct 2006 21:06:16 +0000 Subject: Merge of the client/refactor branch (revisions r2218-r2400) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2401 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/PostInstall.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/lib/Client/Tools/PostInstall.py (limited to 'src/lib/Client/Tools/PostInstall.py') 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')) + -- cgit v1.2.3-1-g7c22