From 86619962407990ad5bd0bfa38ac251af465d96f9 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 3 Dec 2004 19:44:47 +0000 Subject: add support for restart targets other than reload (Logical change 1.157) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@700 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Debian.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py index b46b10654..0e7f9ef71 100644 --- a/src/lib/Client/Debian.py +++ b/src/lib/Client/Debian.py @@ -211,13 +211,13 @@ class Debian(Toolset): self.VerifyEntry(child) self.CondPrint('debug', "Re-checked entry %s %s: %s" % (child.tag, child.get('name'), self.states[child])) - for svc in [svc.get('name') for svc in bchildren if svc.tag == 'Service']: + for svc in [svc for svc in bchildren if svc.tag == 'Service']: if self.setup['build']: # stop services in miniroot - system("/etc/init.d/%s stop" % (svc)) + system('/etc/init.d/%s stop' % svc.get('name')) else: - self.CondPrint('debug', "Restarting service %s" % (svc)) - system('/etc/init.d/%s reload > /dev/null' % (svc)) + self.CondPrint('debug', 'Restarting service %s' % svc.get('name')) + system('/etc/init.d/%s %s' % (svc.get('name'), svc.get('reload', 'reload')) for entry in self.structures: if [strent for strent in entry.getchildren() if not self.states[strent]]: -- cgit v1.2.3-1-g7c22