fix: upgrade gets stuck when the database is damaged

Resolves: #664433
This commit is contained in:
Jan Vcelak 2011-01-25 14:11:40 +01:00
parent 2ace38858b
commit a56681c41a

View File

@ -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