mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
acme: handle alternative schema ldif location
pki-server-10.9.0-0.3 relocates the ACME schema LDIF file. Look for the file in both the old and new locations to smooth the transition. Part of: https://pagure.io/freeipa/issue/4751 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
85d0272053
commit
f9f3b3b118
@ -1107,10 +1107,21 @@ def ca_upgrade_schema(ca):
|
||||
logger.info('CA is not configured')
|
||||
return False
|
||||
|
||||
# ACME schema file moved in pki-server-10.9.0-0.3
|
||||
for path in [
|
||||
'/usr/share/pki/acme/conf/database/ldap/schema.ldif',
|
||||
'/usr/share/pki/acme/database/ldap/schema.ldif',
|
||||
]:
|
||||
if os.path.exists(path):
|
||||
acme_schema_ldif = path
|
||||
break
|
||||
else:
|
||||
raise RuntimeError('ACME schema file not found')
|
||||
|
||||
schema_files=[
|
||||
'/usr/share/pki/server/conf/schema-certProfile.ldif',
|
||||
'/usr/share/pki/server/conf/schema-authority.ldif',
|
||||
'/usr/share/pki/acme/conf/database/ldap/schema.ldif',
|
||||
acme_schema_ldif,
|
||||
]
|
||||
try:
|
||||
modified = schemaupdate.update_schema(schema_files, ldapi=True)
|
||||
|
Loading…
Reference in New Issue
Block a user