Merge pull request #1295 from sharpone74/develop

Small change in upstart.py service module to correctly report a target service start/stop status.
This commit is contained in:
Thomas S Hatch 2012-05-16 22:52:42 -07:00
commit c2c3ef0712

View File

@ -221,9 +221,9 @@ def status(name, sig=None):
salt '*' service.status <service name>
'''
cmd = 'service {0} status'.format(name)
if _service_is_sysv(name):
return not bool(__salt__['cmd.retcode'](cmd))
return 'start/running' in __salt__['cmd.run'](cmd)
if _service_is_upstart(name):
return 'start/running' in __salt__['cmd.run'](cmd)
return not bool(__salt__['cmd.retcode'](cmd))
def _get_service_exec():