From 8883162cba0d2f8050a51994cbe50471b4845ee4 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 23 Aug 2016 16:51:30 -0400 Subject: [PATCH] [RM-17107] hosts.rhel: detect if a remote node is systemd with the is_systemd utility Signed-off-by: Alfredo Deza --- ceph_deploy/hosts/rhel/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ceph_deploy/hosts/rhel/__init__.py b/ceph_deploy/hosts/rhel/__init__.py index 6ee4ccb..a86ad50 100644 --- a/ceph_deploy/hosts/rhel/__init__.py +++ b/ceph_deploy/hosts/rhel/__init__.py @@ -2,6 +2,7 @@ from . import mon # noqa from .install import install, mirror_install, repo_install # 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 # @@ -23,6 +24,9 @@ def choose_init(module): 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