Squashed commit of the following:

commit e057ea671395ec8847f920a63cf9524f5c8fde5f
Author: Ton Kersten <tonk@tonkersten.com>
Date:   Thu Feb 28 13:02:25 2013 +0100

    Fixed the service command not working

    On Ubuntu 1[02].04 the service name was not recognized because
    there is a SysV style init script, but not an upstart config file.

    Example: The `ntp` client.

    Also removed extra spaces at the end of the lines, while at it.
pull/2231/head
Ton Kersten 12 years ago
parent 23bcb64758
commit 05c70ca712

@ -363,6 +363,9 @@ class LinuxService(Service):
elif location.get('update-rc.d', None) and os.path.exists("/etc/init/%s.conf" % self.name):
# service is managed by upstart
self.enable_cmd = location['update-rc.d']
elif location.get('update-rc.d', None) and os.path.exists("/etc/init.d/%s" % self.name):
# service is managed by with SysV init scripts, but with update-rc.d
self.enable_cmd = location['update-rc.d']
elif location.get('systemctl', None):
# verify service is managed by systemd

Loading…
Cancel
Save