summaryrefslogtreecommitdiffstats
path: root/ipaserver/install
diff options
context:
space:
mode:
Diffstat (limited to 'ipaserver/install')
-rw-r--r--ipaserver/install/krbinstance.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py
index 4f1995f7b..214945301 100644
--- a/ipaserver/install/krbinstance.py
+++ b/ipaserver/install/krbinstance.py
@@ -273,6 +273,13 @@ class KrbInstance(service.Service):
os.chmod(path, chmod)
def __init_ipa_kdb(self):
+ # Save away old stash file if any
+ old_stash = os.path.join(paths.VAR_KERBEROS_KRB5KDC_DIR,
+ '.k5.' + self.realm)
+ if os.path.exists(old_stash):
+ self.fstore.backup_file(old_stash);
+ os.unlink(old_stash);
+
# kdb5_util may take a very long time when entropy is low
installutils.check_entropy()