From ec6ab83ab433934f92596fb94e33ad4bdfbc3156 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 4 Nov 2004 22:27:10 +0000 Subject: fix Build mode services (Logical change 1.147) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@651 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Debian.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py index ebc22adea..f045a07ad 100644 --- a/src/lib/Client/Debian.py +++ b/src/lib/Client/Debian.py @@ -218,10 +218,14 @@ class Debian(Toolset): else: self.VerifyEntry(child) self.CondPrint('debug', "Re-checking entry %s %s: %s" % (child.tag, child.get('name'), self.states[child])) - if not self.setup['build']: - for svc in [x.get('name') for x in entry.getchildren() if x.tag == 'Service']: + + + for svc in [x.get('name') for x in entry.getchildren() if x.tag == 'Service']: + if not self.setup['build']: self.CondPrint('debug', "Restarting service %s" % (svc)) system('/etc/init.d/%s restart > /dev/null' % (svc)) + else: + system("/etc/init.d/%s stop" % (svc)) if [x for x in entry.getchildren() if not self.states[x]]: if entry.tag == 'Bundle': -- cgit v1.2.3-1-g7c22