Imported Upstream version 4.8.10

This commit is contained in:
Mario Fetka
2021-10-03 11:06:28 +02:00
parent 10dfc9587b
commit 03a8170b15
2361 changed files with 1883897 additions and 338759 deletions

View File

@@ -20,3 +20,4 @@
'''
This module contains RHEL-specific platform files.
'''
NAME = 'rhel'

View File

@@ -0,0 +1,26 @@
#
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
'''
This RHEL base platform module exports platform related constants.
'''
# Fallback to default constant definitions
from __future__ import absolute_import
from ipaplatform.redhat.constants import RedHatConstantsNamespace
from ipaplatform.osinfo import osinfo
# RHEL 7 and earlier use /etc/sysconfig/nfs
# RHEL 8 uses /etc/nfs.conf
HAS_NFS_CONF = osinfo.version_number >= (8,)
class RHELConstantsNamespace(RedHatConstantsNamespace):
IPA_ADTRUST_PACKAGE_NAME = "ipa-server-trust-ad"
IPA_DNS_PACKAGE_NAME = "ipa-server-dns"
if HAS_NFS_CONF:
SECURE_NFS_VAR = None
constants = RHELConstantsNamespace()

View File

@@ -23,11 +23,15 @@ in RHEL-based systems.
'''
# Fallback to default path definitions
from __future__ import absolute_import
from ipaplatform.redhat.paths import RedHatPathNamespace
from ipaplatform.rhel.constants import HAS_NFS_CONF
class RHELPathNamespace(RedHatPathNamespace):
pass
if HAS_NFS_CONF:
SYSCONFIG_NFS = '/etc/nfs.conf'
paths = RHELPathNamespace()

View File

@@ -22,14 +22,13 @@
Contains RHEL-specific service class implementations.
"""
from __future__ import absolute_import
from ipaplatform.redhat import services as redhat_services
# Mappings from service names as FreeIPA code references to these services
# to their actual systemd service names
rhel_system_units = redhat_services.redhat_system_units
# Service that sets domainname on RHEL is called rhel-domainname.service
rhel_system_units['domainname'] = 'rhel-domainname.service'
rhel_system_units = redhat_services.redhat_system_units.copy()
# Service classes that implement RHEL-specific behaviour
@@ -41,21 +40,19 @@ class RHELService(redhat_services.RedHatService):
# Function that constructs proper RHEL-specific server classes for services
# of specified name
def rhel_service_class_factory(name):
if name == 'domainname':
return RHELService(name)
return redhat_services.redhat_service_class_factory(name)
def rhel_service_class_factory(name, api=None):
return redhat_services.redhat_service_class_factory(name, api)
# Magicdict containing RHELService instances.
class RHELServices(redhat_services.RedHatServices):
def service_class_factory(self, name):
return rhel_service_class_factory(name)
def service_class_factory(self, name, api=None):
return rhel_service_class_factory(name, api)
# Objects below are expected to be exported by platform module
from ipaplatform.redhat.services import timedate_services
timedate_services = redhat_services.timedate_services
service = rhel_service_class_factory
knownservices = RHELServices()

View File

@@ -21,6 +21,8 @@
This module contains default RHEL-specific implementations of system tasks.
'''
from __future__ import absolute_import
from ipaplatform.redhat.tasks import RedHatTaskNamespace