diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 08:19:09 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 08:19:09 -0400 |
commit | 317d3087459538877100032733477362f456f550 (patch) | |
tree | 27fabdff3649c75bcdd9de8ccde5c5826c679e5e /src/lib/Bcfg2/Client/Tools/RcUpdate.py | |
parent | 9d5e8170292e17d3b087878918562dcf502f70d4 (diff) | |
parent | a519dc9298317b678bca43597892df5aa13d874d (diff) | |
download | bcfg2-317d3087459538877100032733477362f456f550.tar.gz bcfg2-317d3087459538877100032733477362f456f550.tar.bz2 bcfg2-317d3087459538877100032733477362f456f550.zip |
Merge branch 'maint'
Conflicts:
doc/server/plugins/generators/cfg.txt
doc/server/plugins/generators/tcheetah.txt
src/lib/Bcfg2/Server/Admin/Xcmd.py
src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/RcUpdate.py')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/RcUpdate.py | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/RcUpdate.py b/src/lib/Bcfg2/Client/Tools/RcUpdate.py index d6329256e..8e9626521 100644 --- a/src/lib/Bcfg2/Client/Tools/RcUpdate.py +++ b/src/lib/Bcfg2/Client/Tools/RcUpdate.py @@ -62,27 +62,29 @@ class RcUpdate(Bcfg2.Client.Tools.SvcTool): entry.get('name')) return False - svcstatus = self.check_service(entry) - if entry.get('status') == 'on': - if svcstatus: - current_srvstatus = True - else: - current_srvstatus = False - elif entry.get('status') == 'off': - if svcstatus: - current_srvstatus = False - else: - current_srvstatus = True - else: + if entry.get('status') == 'ignore': # 'ignore' should verify - current_srvstatus = True + current_svcstatus = True + svcstatus = True + else: + svcstatus = self.check_service(entry) + if entry.get('status') == 'on': + if svcstatus: + current_svcstatus = True + else: + current_svcstatus = False + elif entry.get('status') == 'off': + if svcstatus: + current_svcstatus = False + else: + current_svcstatus = True if svcstatus: entry.set('current_status', 'on') else: entry.set('current_status', 'off') - return current_bootstatus and current_srvstatus + return current_bootstatus and current_svcstatus def InstallService(self, entry): """Install Service entry.""" |