Imported Debian patch 4.8.10-2
This commit is contained in:
committed by
Mario Fetka
parent
8bc559c5a1
commit
358acdd85f
@@ -10,10 +10,17 @@ This RHEL base platform module exports platform related constants.
|
||||
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()
|
||||
|
||||
@@ -26,10 +26,12 @@ in RHEL-based systems.
|
||||
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()
|
||||
|
||||
@@ -28,10 +28,7 @@ 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
|
||||
@@ -44,8 +41,6 @@ class RHELService(redhat_services.RedHatService):
|
||||
# of specified name
|
||||
|
||||
def rhel_service_class_factory(name, api=None):
|
||||
if name == 'domainname':
|
||||
return RHELService(name, api)
|
||||
return redhat_services.redhat_service_class_factory(name, api)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user