From a56681c41aacbe804acc0a55442ed4e6b39843f9 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Tue, 25 Jan 2011 14:11:40 +0100 Subject: [PATCH] fix: upgrade gets stuck when the database is damaged Resolves: #664433 --- openldap.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openldap.spec b/openldap.spec index 5badfe6..9f59a73 100644 --- a/openldap.spec +++ b/openldap.spec @@ -430,6 +430,9 @@ if [ $1 -eq 2 ]; then fi if ls *.bdb &>/dev/null; then + # make sure the database is consistent + runuser -m -s /usr/bin/db_recover -- "ldap" -h %{_sharedstatedir}/ldap &>/dev/null + # export the database if [ -f %{_sysconfdir}/openldap/slapd.conf ]; then slapcat -f %{_sysconfdir}/openldap/slapd.conf -l upgrade.ldif &>/dev/null