Swapped conditions of the changed if statements

reviewable/pr18780/r1
Jasper N. Brouwer 11 years ago
parent 677f95294e
commit 9dab01c5e2

@ -431,10 +431,10 @@ class LinuxService(Service):
if check_systemd(self.name): if check_systemd(self.name):
# service is managed by systemd # service is managed by systemd
self.enable_cmd = location['systemctl'] self.enable_cmd = location['systemctl']
elif os.path.exists("/etc/init/%s.conf" % self.name) and location['initctl']: elif location['initctl'] and os.path.exists("/etc/init/%s.conf" % self.name):
# service is managed by upstart # service is managed by upstart
self.enable_cmd = location['initctl'] self.enable_cmd = location['initctl']
elif os.path.exists("/etc/init.d/%s" % self.name) and location['update-rc.d']: elif location['update-rc.d'] and os.path.exists("/etc/init.d/%s" % self.name):
# service is managed by with SysV init scripts, but with update-rc.d # service is managed by with SysV init scripts, but with update-rc.d
self.enable_cmd = location['update-rc.d'] self.enable_cmd = location['update-rc.d']
else: else:

Loading…
Cancel
Save