fixes corner case for systemd services

when both unit file and sysv init script exist
Thanks to @olfway for fix.

fixes #3764
reviewable/pr18780/r1
Brian Coca 8 years ago
parent 4fddb21980
commit 92b4ae4768

@ -496,6 +496,8 @@ class LinuxService(Service):
(rc, out, err) = self.execute_command("%s is-enabled %s" % (self.enable_cmd, service_name,))
if rc == 0:
return True
elif out.startswith('disabled'):
return False
elif sysv_exists(service_name):
return sysv_is_enabled(service_name)
else:

Loading…
Cancel
Save