From e20b039306c0bac3286ab76a267593d57a1b1e3f Mon Sep 17 00:00:00 2001 From: John Morris Date: Tue, 11 Sep 2012 09:16:50 -0500 Subject: Chkconfig client tool: fix service start result logic When the bcfg2 client installs a service turning it 'on' with chkconfig, it then starts the service with 'service foo start'. If all these succeed, it should return a True success value. This fixes a bug where starting the service succeeds, but is interpreted as failure, ultimately causing the host to be reported as dirty. --- src/lib/Bcfg2/Client/Tools/Chkconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Bcfg2/Client/Tools/Chkconfig.py b/src/lib/Bcfg2/Client/Tools/Chkconfig.py index 29ec5dec9..b62fb9ef8 100644 --- a/src/lib/Bcfg2/Client/Tools/Chkconfig.py +++ b/src/lib/Bcfg2/Client/Tools/Chkconfig.py @@ -79,7 +79,7 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool): rv &= self.cmd.run(rcmd % (entry.get('name'), entry.get('status')))[0] == 0 if entry.get("current_status") == "off": - rv &= self.start_service(entry) + rv &= (self.start_service(entry) == 0) return rv def FindExtra(self): -- cgit v1.2.3-1-g7c22