diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-04-05 16:13:30 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-04-05 16:13:30 +0000 |
commit | 1cf7e41e92513556381d2b33492777e23a8c4df4 (patch) | |
tree | 4000d1869465e4966011dba9d8b5eeb5fc918012 /src | |
parent | 347fb9e983255e89f1fa04090e4141bfdfe72e9e (diff) | |
download | bcfg2-1cf7e41e92513556381d2b33492777e23a8c4df4.tar.gz bcfg2-1cf7e41e92513556381d2b33492777e23a8c4df4.tar.bz2 bcfg2-1cf7e41e92513556381d2b33492777e23a8c4df4.zip |
Change to /etc/init.d/svc restart for DebInit services (Resolves Ticket #417)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3008 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Client/Tools/DebInit.py | 1 | ||||
-rw-r--r-- | src/lib/Client/Tools/__init__.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Client/Tools/DebInit.py b/src/lib/Client/Tools/DebInit.py index addf3c1a8..2194de702 100644 --- a/src/lib/Client/Tools/DebInit.py +++ b/src/lib/Client/Tools/DebInit.py @@ -10,6 +10,7 @@ class DebInit(Bcfg2.Client.Tools.SvcTool): __execs__ = ['/usr/sbin/update-rc.d'] __handles__ = [('Service', 'deb')] __req__ = {'Service': ['name', 'status']} + __svcrestart__ = 'restart' svcre = re.compile("/etc/.*/[SK]\d\d(?P<name>\S+)") # implement entry (Verify|Install) ops diff --git a/src/lib/Client/Tools/__init__.py b/src/lib/Client/Tools/__init__.py index 135896b8f..21b5a4a00 100644 --- a/src/lib/Client/Tools/__init__.py +++ b/src/lib/Client/Tools/__init__.py @@ -255,6 +255,7 @@ class PkgTool(Tool): class SvcTool(Tool): '''This class defines basic Service behavior''' __name__ = 'SvcTool' + __svcrestart__ = 'reload' def BundleUpdated(self, bundle): '''The Bundle has been updated''' @@ -263,7 +264,7 @@ class SvcTool(Tool): if entry.get('status') == 'on': self.logger.debug('Restarting service %s' % entry.get('name')) rc = self.cmd.run('/etc/init.d/%s %s' % \ - (entry.get('name'), entry.get('reload', 'reload')))[0] + (entry.get('name'), entry.get('reload', self.__svcrestart__)))[0] else: self.logger.debug('Stopping service %s' % entry.get('name')) rc = self.cmd.run('/etc/init.d/%s stop' % (entry.get('name')))[0] |