The Identity, Policy and Audit system
CentOS Sources
2016-11-03 403b09ab980c02ef36095973349a13e0181c794a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 7422ad189f90d596fcda93da97ae1cd152df4df3 Mon Sep 17 00:00:00 2001
From: Martin Basti <mbasti@redhat.com>
Date: Fri, 5 Aug 2016 17:35:49 +0200
Subject: [PATCH] ipa-backup: backup /etc/tmpfiles.d/dirsrv-<instance>.conf
 
This file allows daemon tmpfiles.d to re-create the dirs in volatile
directories like /var/run or /var/lock. Without this file Dirsrv will
not start.
 
https://fedorahosted.org/freeipa/ticket/6165
 
Reviewed-By: Petr Spacek <pspacek@redhat.com>
---
 ipaplatform/base/paths.py       | 1 +
 ipaserver/install/ipa_backup.py | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)
 
diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
index 9c8eaf951df89d373796be3f354bd3c51a329902..5ffe689950792a40c179533c8baf2794c2388696 100644
--- a/ipaplatform/base/paths.py
+++ b/ipaplatform/base/paths.py
@@ -132,6 +132,7 @@ class BasePathNamespace(object):
     SYSTEMD_IPA_SERVICE = "/etc/systemd/system/multi-user.target.wants/ipa.service"
     SYSTEMD_SSSD_SERVICE = "/etc/systemd/system/multi-user.target.wants/sssd.service"
     SYSTEMD_PKI_TOMCAT_SERVICE = "/etc/systemd/system/pki-tomcatd.target.wants/pki-tomcatd@pki-tomcat.service"
+    ETC_TMPFILESD_DIRSRV = "/etc/tmpfiles.d/dirsrv-%s.conf"
     DNSSEC_TRUSTED_KEY = "/etc/trusted-key.key"
     HOME_DIR = "/home"
     PROC_FIPS_ENABLED = "/proc/sys/crypto/fips_enabled"
diff --git a/ipaserver/install/ipa_backup.py b/ipaserver/install/ipa_backup.py
index 18a60ecd13c7e7f5381b61ec70ea308a1931b7ec..9b09f4293028c3e560337ba082164b528cf76d80 100644
--- a/ipaserver/install/ipa_backup.py
+++ b/ipaserver/install/ipa_backup.py
@@ -337,9 +337,12 @@ class Backup(admintool.AdminTool):
             if os.path.exists(dir):
                 self.dirs.append(dir)
 
-        file = paths.SYSCONFIG_DIRSRV_INSTANCE % serverid
-        if os.path.exists(file):
-            self.files.append(file)
+        for file in (
+            paths.SYSCONFIG_DIRSRV_INSTANCE % serverid,
+            paths.ETC_TMPFILESD_DIRSRV % serverid,
+        ):
+            if os.path.exists(file):
+                self.files.append(file)
 
         self.logs.append(paths.VAR_LOG_DIRSRV_INSTANCE_TEMPLATE % serverid)
 
-- 
2.7.4