diff options
author | Petr Viktorin <pviktori@redhat.com> | 2013-04-26 12:55:56 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-11-18 16:54:21 +0100 |
commit | 9e79d2bc5e85874ebb90f97e1660d160a65ebddb (patch) | |
tree | 6c8f4f7bd52f1117c89f30d2366e8a82947ce86f | |
parent | 070868f4357e6e80c45a76a98313f9591ebc56f7 (diff) | |
download | freeipa-9e79d2bc5e85874ebb90f97e1660d160a65ebddb.tar.gz freeipa-9e79d2bc5e85874ebb90f97e1660d160a65ebddb.tar.xz freeipa-9e79d2bc5e85874ebb90f97e1660d160a65ebddb.zip |
dsinstance: Move the list of schema filenames to a constant
Preparation for: https://fedorahosted.org/freeipa/ticket/3454
-rw-r--r-- | ipaserver/install/dsinstance.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py index 9c2720499..1932083e9 100644 --- a/ipaserver/install/dsinstance.py +++ b/ipaserver/install/dsinstance.py @@ -49,6 +49,19 @@ CACERT="/etc/ipa/ca.crt" DS_USER = 'dirsrv' DS_GROUP = 'dirsrv' +IPA_SCHEMA_FILES = ("60kerberos.ldif", + "60samba.ldif", + "60ipaconfig.ldif", + "60basev2.ldif", + "60basev3.ldif", + "60ipadns.ldif", + "61kerberos-ipav3.ldif", + "65ipasudo.ldif", + "70ipaotp.ldif") + +ALL_SCHEMA_FILES = IPA_SCHEMA_FILES + ("05rfc2247.ldif", ) + + def find_server_root(): if ipautil.dir_exists(SERVER_ROOT_64): return SERVER_ROOT_64 @@ -453,15 +466,7 @@ class DsInstance(service.Service): def __add_default_schemas(self): pent = pwd.getpwnam(DS_USER) - for schema_fname in ("60kerberos.ldif", - "60samba.ldif", - "60ipaconfig.ldif", - "60basev2.ldif", - "60basev3.ldif", - "60ipadns.ldif", - "61kerberos-ipav3.ldif", - "65ipasudo.ldif", - "70ipaotp.ldif"): + for schema_fname in IPA_SCHEMA_FILES: target_fname = schema_dirname(self.serverid) + schema_fname shutil.copyfile(ipautil.SHARE_DIR + schema_fname, target_fname) os.chmod(target_fname, 0440) # read access for dirsrv user/group |