Import Upstream version 4.12.4
This commit is contained in:
@@ -9,7 +9,9 @@ This Fedora 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.redhat.constants import (
|
||||
RedHatConstantsNamespace, User, Group
|
||||
)
|
||||
from ipaplatform.osinfo import osinfo
|
||||
|
||||
# Fedora 28 and earlier use /etc/sysconfig/nfs
|
||||
@@ -18,6 +20,9 @@ from ipaplatform.osinfo import osinfo
|
||||
HAS_NFS_CONF = osinfo.version_number >= (30,)
|
||||
|
||||
|
||||
__all__ = ("constants", "User", "Group")
|
||||
|
||||
|
||||
class FedoraConstantsNamespace(RedHatConstantsNamespace):
|
||||
# Fedora allows installation of Python 2 and 3 mod_wsgi, but the modules
|
||||
# can't coexist. For Apache to load correct module.
|
||||
@@ -27,4 +32,6 @@ class FedoraConstantsNamespace(RedHatConstantsNamespace):
|
||||
if HAS_NFS_CONF:
|
||||
SECURE_NFS_VAR = None
|
||||
|
||||
NAMED_OPENSSL_ENGINE = "pkcs11"
|
||||
|
||||
constants = FedoraConstantsNamespace()
|
||||
|
||||
@@ -29,6 +29,8 @@ 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
|
||||
fedora_system_units = redhat_services.redhat_system_units.copy()
|
||||
fedora_system_units['named'] = fedora_system_units['named-regular']
|
||||
fedora_system_units['named-conflict'] = fedora_system_units['named-pkcs11']
|
||||
|
||||
|
||||
# Service classes that implement Fedora-specific behaviour
|
||||
@@ -41,6 +43,8 @@ class FedoraService(redhat_services.RedHatService):
|
||||
# of specified name
|
||||
|
||||
def fedora_service_class_factory(name, api=None):
|
||||
if name in ['named', 'named-conflict']:
|
||||
return FedoraService(name, api)
|
||||
return redhat_services.redhat_service_class_factory(name, api)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user