From f2e7f27a1667e3a4228973d163ad4c57c9702ff7 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 23 Aug 2016 16:50:48 -0400 Subject: [PATCH] [RM-17107] hosts.centos: use ceph.target for systemd and is_systemd util for detection Signed-off-by: Alfredo Deza --- ceph_deploy/hosts/centos/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ceph_deploy/hosts/centos/__init__.py b/ceph_deploy/hosts/centos/__init__.py index 61b3b90..3c03fda 100644 --- a/ceph_deploy/hosts/centos/__init__.py +++ b/ceph_deploy/hosts/centos/__init__.py @@ -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): -- 2.47.3