/[smeserver]/rpms/e-smith-ldap/sme9/e-smith-ldap-5.4.0-dont_overwrite_ldif_with_empty.patch
ViewVC logotype

Annotation of /rpms/e-smith-ldap/sme9/e-smith-ldap-5.4.0-dont_overwrite_ldif_with_empty.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Fri Oct 24 08:04:23 2014 UTC (9 years, 7 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-ldap-5_4_0-13_el6_sme, e-smith-ldap-5_4_0-21_el6_sme, e-smith-ldap-5_4_0-17_el6_sme, e-smith-ldap-5_4_0-20_el6_sme, e-smith-ldap-5_4_0-16_el6_sme, e-smith-ldap-5_4_0-18_el6_sme, e-smith-ldap-5_4_0-15_el6_sme, e-smith-ldap-5_4_0-14_el6_sme, e-smith-ldap-5_4_0-19_el6_sme, e-smith-ldap-5_6_0-1_el7_sme, HEAD
* Fri Oct 24 2014 Daniel Berteaud <daniel@firewall-services.com> 5.4.0-13.sme
- Don't overwrite the ldif dump if slapcat's output is empty
  (code from Charlie Brady) [SME: 8621]

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed