summaryrefslogtreecommitdiffstats
path: root/generators/servicemgr.py
blob: 7ba276c35e32931317aabea6480ad3996de30364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python

from Generator import Generator
from GeneratorUtils import DirectoryBacked
from Types import Service

class servicemgr(Generator):
    '''This is a generator that handles service assignments'''
    __name__ = 'servicemgr'
    __version__ = '$Id$'
    __author__ = 'bcfg-dev@mcs.anl.gov'

    def GetService(self,name,client):
        # for now sshd is on
        if name == 'sshd':
            return Service('sshd','chkconfig','on','global')
        else:
            return Service(name,'chkconfig','off','local')