Skip to content

Commit

Permalink
The fix for ansiblegh-7284 causes problems for initscripts which have…
Browse files Browse the repository at this point in the history
… the

standards compliant return codes but return a verbose error message via
stdout.  Limit the times when we invoke the heuristic to attempt to work
around this.
  • Loading branch information
abadger committed Sep 22, 2014
1 parent c289ba1 commit cec7dd6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/system/service
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,10 @@ class LinuxService(Service):
self.crashed = "crashed" in openrc_status_stderr

# if the job status is still not known check it by status output keywords
if self.running is None:
# Only check keywords if there's only one line of output (some init
# scripts will output verbosely in case of error and those can emit
# keywords that are picked up as false positives
if self.running is None and status_stdout.count('\n') <= 1:
# first transform the status output that could irritate keyword matching
cleanout = status_stdout.lower().replace(self.name.lower(), '')
if "stop" in cleanout:
Expand Down

0 comments on commit cec7dd6

Please sign in to comment.