1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Consider service stopped if rc is 1

Per LSB spec, consider service stopped if rc from 'service status' is 1.
Added comment with url to LSB spec reference.
This commit is contained in:
Stephen Fromm 2013-03-06 10:18:34 -08:00
parent ca16a91da1
commit 6e35392f92

View file

@ -414,8 +414,10 @@ class LinuxService(Service):
self.running = True
# if the job status is still not known check it by response code
# For reference, see:
# http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
if self.running is None:
if rc in [2, 3, 4, 69]:
if rc in [1, 2, 3, 4, 69]:
self.running = False
elif rc == 0:
self.running = True