]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-detect-init: return correct value on recent SUSE distros 7909/head
authorNathan Cutler <ncutler@suse.com>
Thu, 3 Mar 2016 18:10:46 +0000 (19:10 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 3 Mar 2016 18:10:46 +0000 (19:10 +0100)
http://tracker.ceph.com/issues/14770 Fixes: #14770

Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/ceph-detect-init/ceph_detect_init/suse/__init__.py

index 69bf7c481e72fcbe936322d5866a8b3d98d843e1..0c3753b3cbed4ac136408316ef429e8ff372aeb5 100644 (file)
@@ -8,10 +8,6 @@ def choose_init():
 
     Returns the name of a init system (upstart, sysvinit ...).
     """
-    init_mapping = {
-        '11': 'sysvinit',   # SLE_11
-        '12': 'systemd',    # SLE_12
-        '13.1': 'systemd',  # openSUSE_13.1
-        '13.2': 'systemd',  # openSUSE_13.2
-    }
-    return init_mapping.get(release, 'sysvinit')
+    if release and int(release.split('.')[0]) >= 12:
+        return 'systemd'
+    return 'sysvinit'