diff options
| author | Simo Sorce <simo@redhat.com> | 2016-12-01 11:37:20 -0500 |
|---|---|---|
| committer | Simo Sorce <simo@redhat.com> | 2017-02-14 17:36:44 -0500 |
| commit | 70ac48f4c532098fd6d7147be1d1864487fe52e0 (patch) | |
| tree | 1d81451d6be77034745644b1fa41545d2f175c76 /ipaserver/install | |
| parent | 8b88ef00331f1fbb28802b3eba5ced62daeffc9e (diff) | |
| download | freeipa-70ac48f4c532098fd6d7147be1d1864487fe52e0.tar.gz freeipa-70ac48f4c532098fd6d7147be1d1864487fe52e0.tar.xz freeipa-70ac48f4c532098fd6d7147be1d1864487fe52e0.zip | |
Generate tmpfiles config at install time
We do not want to generate runtime directories just because the packages
are installed, but only if the server is actually setup and run. Also this
will be needed later because we will create a user at install time and some
tmpfiles will need to be owned by this user.
As we are changing this code also rationalize the directory structure and
move it from the http rundir to the ipa specific rundir.
https://fedorahosted.org/freeipa/ticket/5959
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipaserver/install')
| -rw-r--r-- | ipaserver/install/server/install.py | 6 | ||||
| -rw-r--r-- | ipaserver/install/server/replicainstall.py | 3 | ||||
| -rw-r--r-- | ipaserver/install/server/upgrade.py | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py index 2b19230ff..f7db25ce3 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -713,6 +713,9 @@ def install(installer): if installer._update_hosts_file: update_hosts_file(ip_addresses, host_name, fstore) + # Make sure tmpfiles dir exist before installing components + tasks.create_tmpfiles_dirs() + http_instance = httpinstance.HTTPInstance() http_instance.create_cert_db() @@ -882,6 +885,9 @@ def install(installer): except Exception: raise ScriptError("Configuration of client side components failed!") + # Make sure the files we crated in /var/run are recreated at startup + tasks.configure_tmpfiles() + # Everything installed properly, activate ipa service. services.knownservices.ipa.enable() diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 65e6f2097..0747feec6 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -1300,6 +1300,9 @@ def install(installer): conn = remote_api.Backend.ldap2 ccache = os.environ['KRB5CCNAME'] + # Make sure tmpfiles dir exist before installing components + tasks.create_tmpfiles_dirs() + if promote: if installer._add_to_ipaservers: try: diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py index 2bdf6eede..c7f0f9f44 100644 --- a/ipaserver/install/server/upgrade.py +++ b/ipaserver/install/server/upgrade.py @@ -1795,6 +1795,10 @@ def upgrade_check(options): def upgrade(): + # Do this early so that any code depending on these dirs will not fail + tasks.create_tmpfiles_dirs() + tasks.configure_tmpfiles() + realm = api.env.realm schema_files = [os.path.join(paths.USR_SHARE_IPA_DIR, f) for f in dsinstance.ALL_SCHEMA_FILES] |
