Re-add stateful return for service.enabled and service.disabled

Modifies `service.enabled` and `service.disabled` so they work properly
with the changes to the return value of `_enable()` and `_disable()`.
This commit is contained in:
Loren Gordon 2015-03-06 12:17:54 -05:00
parent 91f499ec28
commit 6f161a7c77

View File

@ -404,7 +404,13 @@ def enabled(name, **kwargs):
name
The name of the init or rc script used to manage the service
'''
return _enable(name, None, **kwargs)
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
ret.update(_enable(name, None, **kwargs))
return ret
def disabled(name, **kwargs):
@ -417,7 +423,13 @@ def disabled(name, **kwargs):
name
The name of the init or rc script used to manage the service
'''
return _disable(name, None, **kwargs)
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
ret.update(_disable(name, None, **kwargs))
return ret
def mod_watch(name, sfun=None, sig=None, reload=False, full_restart=False):