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