summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Redhat.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-12-08 17:15:33 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-12-08 17:15:33 +0000
commitfde7e7c7d8a3f98ab9b7025a87dd60c22b194ea0 (patch)
treedc822756988a4c835537e4b1b78f4f3494d14c1c /src/lib/Client/Redhat.py
parent2769d83e0b648d1d623b4a1648973d6c32945b13 (diff)
downloadbcfg2-fde7e7c7d8a3f98ab9b7025a87dd60c22b194ea0.tar.gz
bcfg2-fde7e7c7d8a3f98ab9b7025a87dd60c22b194ea0.tar.bz2
bcfg2-fde7e7c7d8a3f98ab9b7025a87dd60c22b194ea0.zip
Stop services on debian if they are enabled but shouldn't be
Produce a reasonable error message if the server completely bound service entries git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1616 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Redhat.py')
-rw-r--r--src/lib/Client/Redhat.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py
index 4992b04d1..4e83a15c8 100644
--- a/src/lib/Client/Redhat.py
+++ b/src/lib/Client/Redhat.py
@@ -61,6 +61,9 @@ class Redhat(Toolset):
'''Install Service entry'''
system("/sbin/chkconfig --add %s"%(entry.attrib['name']))
self.CondPrint('verbose', "Installing Service %s" % (entry.get('name')))
+ if not entry.get('status'):
+ print "Can't install service %s, not enough data" % (entry.get('name'))
+ return False
if entry.attrib['status'] == 'off':
if self.setup['dryrun']:
print "Disabling server %s" % (entry.get('name'))