diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-10-10 02:13:25 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-10-10 02:13:25 +0000 |
commit | 869e7596ca805151b049c1034e4e5a58a67c73ac (patch) | |
tree | 3da2b381b60c6576cff2ef767e764416f313b019 /src/lib | |
parent | 529c735d90b106f8357d5994b6dad57bc3102699 (diff) | |
download | bcfg2-869e7596ca805151b049c1034e4e5a58a67c73ac.tar.gz bcfg2-869e7596ca805151b049c1034e4e5a58a67c73ac.tar.bz2 bcfg2-869e7596ca805151b049c1034e4e5a58a67c73ac.zip |
Smarten up Chkconfig service supervision (Should Resolve Ticket #587)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4940 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Client/Tools/Chkconfig.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/Chkconfig.py b/src/lib/Client/Tools/Chkconfig.py index 382a575d0..02e01bb32 100644 --- a/src/lib/Client/Tools/Chkconfig.py +++ b/src/lib/Client/Tools/Chkconfig.py @@ -47,6 +47,10 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool): if entry.get('supervised', 'false') == 'true': pstatus, pout = self.cmd.run('/sbin/service %s status' % \ entry.get('name')) + if pstatus: + self.cmd.run('/sbin/service %s start' % (entry.get('name'))) + 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 |