]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-17107] hosts.centos: use ceph.target for systemd and is_systemd util for detection
authorAlfredo Deza <adeza@redhat.com>
Tue, 23 Aug 2016 20:50:48 +0000 (16:50 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 23 Aug 2016 20:50:48 +0000 (16:50 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph_deploy/hosts/centos/__init__.py

index 61b3b9096accd8bf076d48f3f246f6b43840d418..3c03fda8eb04e1875812e3a5b4ad5f1f67331fda 100644 (file)
@@ -2,6 +2,7 @@ from . import mon  # noqa
 from .install import install, mirror_install, repo_install, repository_url_part, rpm_dist  # noqa
 from .uninstall import uninstall  # noqa
 from ceph_deploy.util import pkg_managers
+from ceph_deploy.util.system import is_systemd
 
 # Allow to set some information about this distro
 #
@@ -21,9 +22,12 @@ def choose_init(module):
     if module.normalized_release.int_major < 7:
         return 'sysvinit'
 
-    if not module.conn.remote_module.path_exists("/usr/lib/systemd"):
+    if not module.conn.remote_module.path_exists("/usr/lib/systemd/system/ceph.target"):
         return 'sysvinit'
 
+    if is_systemd(module.conn):
+        return 'systemd'
+
     return 'systemd'
 
 def get_packager(module):