mirror of
https://github.com/ceph/ceph
synced 2024-12-18 09:25:49 +00:00
Adding Arch Linux support
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
parent
28622f88ae
commit
4405e4906e
@ -14,6 +14,7 @@
|
||||
# GNU Library Public License for more details.
|
||||
#
|
||||
from ceph_detect_init import alpine
|
||||
from ceph_detect_init import arch
|
||||
from ceph_detect_init import centos
|
||||
from ceph_detect_init import debian
|
||||
from ceph_detect_init import exc
|
||||
@ -55,6 +56,7 @@ def _get_distro(distro, use_rhceph=False):
|
||||
distro = _normalized_distro_name(distro)
|
||||
distributions = {
|
||||
'alpine': alpine,
|
||||
'arch': arch,
|
||||
'debian': debian,
|
||||
'ubuntu': debian,
|
||||
'linuxmint': debian,
|
||||
@ -94,7 +96,7 @@ def platform_information():
|
||||
"""detect platform information from remote host."""
|
||||
if platform.system() == 'Linux':
|
||||
linux_distro = platform.linux_distribution(
|
||||
supported_dists=platform._supported_dists + ('alpine',))
|
||||
supported_dists=platform._supported_dists + ('alpine', 'arch'))
|
||||
logging.debug('platform_information: linux_distribution = ' +
|
||||
str(linux_distro))
|
||||
distro, release, codename = linux_distro
|
||||
|
11
src/ceph-detect-init/ceph_detect_init/arch/__init__.py
Normal file
11
src/ceph-detect-init/ceph_detect_init/arch/__init__.py
Normal file
@ -0,0 +1,11 @@
|
||||
distro = None
|
||||
release = None
|
||||
codename = None
|
||||
|
||||
|
||||
def choose_init():
|
||||
"""Select a init system
|
||||
|
||||
Returns the name of a init system (upstart, sysvinit ...).
|
||||
"""
|
||||
return 'systemd'
|
@ -24,6 +24,7 @@ import testtools
|
||||
|
||||
import ceph_detect_init
|
||||
from ceph_detect_init import alpine
|
||||
from ceph_detect_init import arch
|
||||
from ceph_detect_init import centos
|
||||
from ceph_detect_init import debian
|
||||
from ceph_detect_init import exc
|
||||
@ -43,6 +44,9 @@ class TestCephDetectInit(testtools.TestCase):
|
||||
def test_alpine(self):
|
||||
self.assertEqual('openrc', alpine.choose_init())
|
||||
|
||||
def test_arch(self):
|
||||
self.assertEqual('systemd', arch.choose_init())
|
||||
|
||||
def test_freebsd(self):
|
||||
self.assertEqual('bsdrc', freebsd.choose_init())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user