X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fceph-detect-init%2Fceph_detect_init%2Fgentoo%2F__init__.py;fp=src%2Fceph%2Fsrc%2Fceph-detect-init%2Fceph_detect_init%2Fgentoo%2F__init__.py;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=c6f4e1e2429f871948aca5a654082d4c72f8dae1;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/ceph-detect-init/ceph_detect_init/gentoo/__init__.py b/src/ceph/src/ceph-detect-init/ceph_detect_init/gentoo/__init__.py deleted file mode 100644 index c6f4e1e..0000000 --- a/src/ceph/src/ceph-detect-init/ceph_detect_init/gentoo/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -distro = None -release = None -codename = None - - -# From ceph-disk, but there is no way to access it since it's not in a module -def is_systemd(): - """ - Detect whether systemd is running; - WARNING: not mutually exclusive with openrc - """ - with open('/proc/1/comm') as i: - return 'systemd' in i.read() - - -def is_openrc(): - """ - Detect whether openrc is running. - """ - OPENRC_CGROUP = '/sys/fs/cgroup/openrc' - return os.path.isdir(OPENRC_CGROUP) - - -def choose_init(): - """Select a init system - - Returns the name of a init system (upstart, sysvinit ...). - """ - if is_openrc(): - return 'openrc' - if is_systemd(): - return 'systemd' - return 'unknown'