]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-14646] check for upstart before checking for systemd 386/head
authorAlfredo Deza <adeza@redhat.com>
Thu, 4 Feb 2016 19:38:44 +0000 (14:38 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 4 Feb 2016 19:38:44 +0000 (14:38 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph_deploy/hosts/debian/__init__.py

index 91b729fd5ed5969a252bcb76f48fc5eefaca4e87..e769c9240ca835c40f337f2a8b19f7b3b5680313 100644 (file)
@@ -18,13 +18,16 @@ def choose_init(module):
 
     Returns the name of a init system (upstart, sysvinit ...).
     """
+    # Upstart checks first because when installing ceph, the
+    # `/lib/systemd/system/ceph.target` file may be created, fooling this
+    # detection mechanism.
+    if is_upstart(module.conn):
+        return 'upstart'
+
     if is_systemd(module.conn) or module.conn.remote_module.path_exists(
             "/lib/systemd/system/ceph.target"):
         return 'systemd'
 
-    if is_upstart(module.conn):
-        return 'upstart'
-
     return 'sysvinit'