summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/DebInit.py1
-rw-r--r--src/lib/Client/Tools/__init__.py3
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]