summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Debian.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-11-04 22:27:10 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-11-04 22:27:10 +0000
commitec6ab83ab433934f92596fb94e33ad4bdfbc3156 (patch)
tree6f4666fbba8fd7deb20133ad5c8b644c392cec8c /src/lib/Client/Debian.py
parent3825a8b1f652390125bb5d46e3d66fe0571cc034 (diff)
downloadbcfg2-ec6ab83ab433934f92596fb94e33ad4bdfbc3156.tar.gz
bcfg2-ec6ab83ab433934f92596fb94e33ad4bdfbc3156.tar.bz2
bcfg2-ec6ab83ab433934f92596fb94e33ad4bdfbc3156.zip
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
Diffstat (limited to 'src/lib/Client/Debian.py')
-rw-r--r--src/lib/Client/Debian.py8
1 files changed, 6 insertions, 2 deletions
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':