summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/PostInstall.py
blob: 34627cacf2e106995c484bf5406d2480d7598cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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'))