diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-05-02 14:30:30 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-05-02 14:30:30 +0000 |
commit | 0e774ad3126fdbd45e54d482e8b44f7c8ecfe208 (patch) | |
tree | ce286dba227b3be6bbc7ee63aa8b79ffacc82a78 /src/lib | |
parent | fc968122fe85df81a1f1afa77e181c9dac29dca1 (diff) | |
download | bcfg2-0e774ad3126fdbd45e54d482e8b44f7c8ecfe208.tar.gz bcfg2-0e774ad3126fdbd45e54d482e8b44f7c8ecfe208.tar.bz2 bcfg2-0e774ad3126fdbd45e54d482e8b44f7c8ecfe208.zip |
Make service supervision explicit
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3078 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Client/Tools/Chkconfig.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/Client/Tools/Chkconfig.py b/src/lib/Client/Tools/Chkconfig.py index 0ef0b46ea..ded4ef16a 100644 --- a/src/lib/Client/Tools/Chkconfig.py +++ b/src/lib/Client/Tools/Chkconfig.py @@ -30,13 +30,17 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool): except IndexError: onlevels = [] - pstatus = self.cmd.run('/sbin/service %s status' % \ - entry.get('name'))[0] - # chkconfig/init.d service if entry.get('status') == 'on': - status = (len(onlevels) > 0 ) and not pstatus + status = (len(onlevels) > 0 ) else: - status = (len(onlevels) == 0) and pstatus + status = (len(onlevels) == 0) + + if entry.get('supervised', 'false') == 'true': + pstatus, pout = self.cmd.run('/sbin/service %s status' % \ + entry.get('name')) + # chkconfig/init.d service + if entry.get('status') == 'on': + status = status and not pstatus if not status: if entry.get('status') == 'on': |