http://tracker.ceph.com/issues/12786 Fixes: #12786
Signed-off-by: Loic Dachary <ldachary@redhat.com>
Returns the name of a init system (upstart, sysvinit ...).
"""
+ if release and int(release.split('.')[0]) >= 7:
+ return 'systemd'
return 'sysvinit'
class TestCephDetectInit(testtools.TestCase):
def test_centos(self):
+ with mock.patch('ceph_detect_init.centos.release',
+ '7.0'):
+ self.assertEqual('systemd', centos.choose_init())
self.assertEqual('sysvinit', centos.choose_init())
def test_debian(self):