summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/Chkconfig.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-03-15 22:08:17 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-03-15 22:08:17 +0000
commit8bff8d27a04a6556155195dadc97952eb36f5104 (patch)
treeb0a0a6bbdbfe04f6d08cc888d714b756a61a1c15 /src/lib/Client/Tools/Chkconfig.py
parent335fc58ef962575103af2bb5a98610be1e3f501f (diff)
downloadbcfg2-8bff8d27a04a6556155195dadc97952eb36f5104.tar.gz
bcfg2-8bff8d27a04a6556155195dadc97952eb36f5104.tar.bz2
bcfg2-8bff8d27a04a6556155195dadc97952eb36f5104.zip
Implement client profile remapping (May resolve Ticket #392)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2943 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/Chkconfig.py')
-rw-r--r--src/lib/Client/Tools/Chkconfig.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/Chkconfig.py b/src/lib/Client/Tools/Chkconfig.py
index a1c1160c9..8e30cccc9 100644
--- a/src/lib/Client/Tools/Chkconfig.py
+++ b/src/lib/Client/Tools/Chkconfig.py
@@ -30,11 +30,12 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool):
except IndexError:
onlevels = []
+ pstatus = self.cmd.run('/sbin/service %s status')[0]
# chkconfig/init.d service
if entry.get('status') == 'on':
- status = len(onlevels) > 0
+ status = (len(onlevels) > 0 ) and pstatus
else:
- status = len(onlevels) == 0
+ status = (len(onlevels) == 0) and not pstatus
if not status:
if entry.get('status') == 'on':