[openldap] fix: upgrade gets stuck when the database is damaged

jvcelak jvcelak at fedoraproject.org
Tue Jan 25 13:13:17 UTC 2011


commit a56681c41aacbe804acc0a55442ed4e6b39843f9
Author: Jan Vcelak <jvcelak at redhat.com>
Date:   Tue Jan 25 14:11:40 2011 +0100

    fix: upgrade gets stuck when the database is damaged
    
    Resolves: #664433

 openldap.spec |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
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


More information about the scm-commits mailing list