From 374088665e43654e97512ab40f2cc141e238f21c Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 4 Feb 2016 14:38:44 -0500 Subject: [PATCH] [RM-14646] check for upstart before checking for systemd Signed-off-by: Alfredo Deza --- ceph_deploy/hosts/debian/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ceph_deploy/hosts/debian/__init__.py b/ceph_deploy/hosts/debian/__init__.py index 91b729f..e769c92 100644 --- a/ceph_deploy/hosts/debian/__init__.py +++ b/ceph_deploy/hosts/debian/__init__.py @@ -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' -- 2.47.3