7 # From ceph-disk, but there is no way to access it since it's not in a module
10 Detect whether systemd is running;
11 WARNING: not mutually exclusive with openrc
13 with open('/proc/1/comm') as i:
14 return 'systemd' in i.read()
19 Detect whether openrc is running.
21 OPENRC_CGROUP = '/sys/fs/cgroup/openrc'
22 return os.path.isdir(OPENRC_CGROUP)
26 """Select a init system
28 Returns the name of a init system (upstart, sysvinit ...).