summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-08 10:38:15 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-08-08 10:38:15 -0400
commit7edcd2fc64c94f98bdacbaad99d00cfdef0a5a66 (patch)
tree0ed98b7a35dda936e8d32c996a156e00c12834c1 /src/lib
parent7f4e30364d024f01c8770d2efe78873386318c11 (diff)
downloadbcfg2-7edcd2fc64c94f98bdacbaad99d00cfdef0a5a66.tar.gz
bcfg2-7edcd2fc64c94f98bdacbaad99d00cfdef0a5a66.tar.bz2
bcfg2-7edcd2fc64c94f98bdacbaad99d00cfdef0a5a66.zip
do not start/stop services with "-s disabled"
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Client/Tools/Chkconfig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/Client/Tools/Chkconfig.py b/src/lib/Client/Tools/Chkconfig.py
index 12d1a3444..f49457363 100644
--- a/src/lib/Client/Tools/Chkconfig.py
+++ b/src/lib/Client/Tools/Chkconfig.py
@@ -60,9 +60,10 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool):
entry.get('name'))[0]
needs_modification = ((command == 'start' and pstatus) or \
(command == 'stop' and not pstatus))
- if not(self.setup.get('dryrun')) and needs_modification:
- self.cmd.run('/sbin/service %s %s' % (entry.get('name'),
- command))
+ if (not self.setup.get('dryrun') and
+ self.setup['servicemode'] != 'disabled' and
+ needs_modification:
+ self.cmd.run(self.get_svc_command(entry, command))
# service was modified, so it failed
pstatus = False