summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Client/Debian.py1
-rw-r--r--src/lib/Client/Redhat.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py
index 75fa1ef65..a7960571f 100644
--- a/src/lib/Client/Debian.py
+++ b/src/lib/Client/Debian.py
@@ -74,6 +74,7 @@ class Debian(Toolset):
if self.setup['dryrun']:
print "Disabling service %s" % (entry.get('name'))
else:
+ system("/etc/init.d/%s stop > /dev/null 2>&1" % (entry.get('name')))
cmdrc = system("update-rc.d -f %s remove" % entry.get('name'))
else:
if self.setup['dryrun']:
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'))