initial code repo
[stor4nfv.git] / src / ceph / src / ceph-detect-init / ceph_detect_init / suse / __init__.py
diff --git a/src/ceph/src/ceph-detect-init/ceph_detect_init/suse/__init__.py b/src/ceph/src/ceph-detect-init/ceph_detect_init/suse/__init__.py
new file mode 100644 (file)
index 0000000..0c3753b
--- /dev/null
@@ -0,0 +1,13 @@
+distro = None
+release = None
+codename = None
+
+
+def choose_init():
+    """Select a init system
+
+    Returns the name of a init system (upstart, sysvinit ...).
+    """
+    if release and int(release.split('.')[0]) >= 12:
+        return 'systemd'
+    return 'sysvinit'