summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-07-23 02:35:15 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-07-23 02:35:15 +0000
commit6c4b09dd17c33abd57703bd6e32ca59c21bf0978 (patch)
tree3f2f011d69b2185b379546d39c762ae584b992d2 /src/lib
parentf2c3657b96dfaedbe321a9bae666124b59a9b0b8 (diff)
downloadbcfg2-6c4b09dd17c33abd57703bd6e32ca59c21bf0978.tar.gz
bcfg2-6c4b09dd17c33abd57703bd6e32ca59c21bf0978.tar.bz2
bcfg2-6c4b09dd17c33abd57703bd6e32ca59c21bf0978.zip
fix conditional restart of services within bundles
2005/07/20 10:58:22-05:00 anl.gov!desai fix true path (Logical change 1.270) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1096 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Client/Toolset.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index ce8f5b1c1..7b7296da0 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -284,6 +284,7 @@ class Toolset(object):
chown(entry.get('name'),
getpwnam(entry.get('owner'))[2], getgrnam(entry.get('group'))[2])
chmod(entry.get('name'), calc_perms(S_IFDIR, entry.get('perms')))
+ return True
except (OSError, KeyError):
self.CondPrint('debug', 'Permission fixup failed for %s' % (entry.get('name')))
return False
@@ -429,7 +430,7 @@ class Toolset(object):
(child.tag, child.get('name'), self.states[child]))
for postinst in [entry for entry in bchildren if entry.tag == 'PostInstall']:
system(postinst.get('name'))
- for svc in [svc for svc in bchildren if svc.tag == 'Service']:
+ for svc in [svc for svc in bchildren if svc.tag == 'Service' and svc.get('status', 'off') == 'on']:
if self.setup['build']:
# stop services in miniroot
system('/etc/init.d/%s stop' % svc.get('name'))