1 |
vip-ire |
1.1 |
diff -Nur e-smith-ldap-5.4.0/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs e-smith-ldap-5.4.0_bz8621/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs |
2 |
|
|
--- e-smith-ldap-5.4.0/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs 2013-02-13 16:21:49.000000000 +0100 |
3 |
|
|
+++ e-smith-ldap-5.4.0_bz8621/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs 2014-10-24 09:52:42.128000000 +0200 |
4 |
|
|
@@ -5,4 +5,5 @@ |
5 |
|
|
set_lg_max 10485760 |
6 |
|
|
set_lg_bsize 2097152 |
7 |
|
|
set_lg_dir /var/log/bdb |
8 |
|
|
- |
9 |
|
|
+set_flags DB_LOG_AUTOREMOVE |
10 |
|
|
+txn_checkpoint 256 5 0 |
11 |
|
|
diff -Nur e-smith-ldap-5.4.0/root/var/service/ldap/finish e-smith-ldap-5.4.0_bz8621/root/var/service/ldap/finish |
12 |
|
|
--- e-smith-ldap-5.4.0/root/var/service/ldap/finish 2014-10-24 09:50:59.766000000 +0200 |
13 |
|
|
+++ e-smith-ldap-5.4.0_bz8621/root/var/service/ldap/finish 2014-10-24 09:59:18.774000000 +0200 |
14 |
|
|
@@ -1,5 +1,22 @@ |
15 |
|
|
#! /bin/sh |
16 |
|
|
|
17 |
|
|
-/usr/sbin/slaptest -u 2>/dev/null && \ |
18 |
|
|
- /usr/sbin/slapcat -l ldif && \ |
19 |
|
|
- /usr/bin/db_archive -d -h /var/log/bdb/ |
20 |
|
|
+exec 2>&1 |
21 |
|
|
+ |
22 |
|
|
+LDIF=$(readlink -n ldif) |
23 |
|
|
+TMP=$LDIF.$$ |
24 |
|
|
+if /usr/sbin/slapcat -l $TMP |
25 |
|
|
+then |
26 |
|
|
+ mv -f $TMP $LDIF |
27 |
|
|
+else |
28 |
|
|
+ echo slapcat dump of ldif failed - shutting down ldap service >&2 |
29 |
|
|
+ echo probable corruption of ldap backend files >&2 |
30 |
|
|
+ |
31 |
|
|
+ # Don't bother to keep a zero length dump file |
32 |
|
|
+ if test ! -s $TMP |
33 |
|
|
+ then |
34 |
|
|
+ rm -f $TMP |
35 |
|
|
+ fi |
36 |
|
|
+ |
37 |
|
|
+ # shut down service if slapcat is failing |
38 |
|
|
+ sv d . |
39 |
|
|
+fi |