Revert "remove checking of stderr for insserv (#1846)"

This reverts commit 2ee6e4cf66.
reviewable/pr18780/r1
James Tanner 9 years ago
parent 430e3eeebd
commit 9be870bb2a

@ -826,12 +826,12 @@ class LinuxService(Service):
if self.enable:
(rc, out, err) = self.execute_command("%s %s" % (self.enable_cmd, self.name))
if (rc != 0):
if (rc != 0) or (err != ''):
self.module.fail_json(msg=("Failed to install service. rc: %s, out: %s, err: %s" % (rc, out, err)))
return (rc, out, err)
else:
(rc, out, err) = self.execute_command("%s -r %s" % (self.enable_cmd, self.name))
if (rc != 0):
if (rc != 0) or (err != ''):
self.module.fail_json(msg=("Failed to remove service. rc: %s, out: %s, err: %s" % (rc, out, err)))
return (rc, out, err)

Loading…
Cancel
Save