diff --git a/salt/modules/systemd.py b/salt/modules/systemd.py index e4e7e7f10b..c25fa92238 100644 --- a/salt/modules/systemd.py +++ b/salt/modules/systemd.py @@ -779,9 +779,11 @@ def enabled(name, **kwargs): # pylint: disable=unused-argument # string will be non-empty. if bool(__salt__['cmd.run'](cmd, python_shell=False)): return True - else: + elif name in _get_sysv_services(): return _sysv_enabled(name) + return False + def disabled(name): '''