Fix bug in service_stopper. introduced bug into the
service stopper logic where is_stopped was always true.

For example the most likely upstart status strings will create the
following values for is_stopped:

out_arr = ['tcsd start/running, process 507',
	   'tcsd stop/waiting',
           'status: Unknown job: tcsd_bogus'
for out in out_arr:
  is_stopped = 'start/running' not in out
  print is_stopped

>>> False
>>> True
>>> True

Previous change incorrectly assummed find would return 0 for a match
and 1 for not but it should have instead key'd off -1 for no match.

TEST=hardware_TPMCheck passes

Reviewed-by: Scott Zawalski <>
Commit-Queue: Todd Broch <>
Tested-by: Todd Broch <>
(cherry picked from commit 7d6386a862470be63bc607fcc0c0eb2b288923df)

Change-Id: Ib554b4d44602ca4456d21b782237b4cff386cff2
Reviewed-by: Scott Zawalski <>
Tested-by: Scott Zawalski <>
1 file changed