Commit 5aef2f06 by Michael DeHaan

Merge pull request #6005 from pgehres/chkconfig

Adding better failure output for chkconfig failures 
parents af7c252b c427a829
...@@ -579,7 +579,7 @@ class LinuxService(Service): ...@@ -579,7 +579,7 @@ class LinuxService(Service):
self.execute_command("%s --add %s" % (self.enable_cmd, self.name)) self.execute_command("%s --add %s" % (self.enable_cmd, self.name))
(rc, out, err) = self.execute_command("%s --list %s" % (self.enable_cmd, self.name)) (rc, out, err) = self.execute_command("%s --list %s" % (self.enable_cmd, self.name))
if not self.name in out: if not self.name in out:
self.module.fail_json(msg="unknown service name") self.module.fail_json(msg="service %s does not support chkconfig" % self.name)
state = out.split()[-1] state = out.split()[-1]
if self.enable and ( "3:on" in out and "5:on" in out ): if self.enable and ( "3:on" in out and "5:on" in out ):
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment