1 |
diff -Nur e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/gentle-ldap-dump e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/gentle-ldap-dump |
2 |
--- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/gentle-ldap-dump 2002-10-02 20:02:37.000000000 +0200 |
3 |
+++ e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/gentle-ldap-dump 2010-12-30 19:30:25.000000000 +0100 |
4 |
@@ -28,6 +28,11 @@ |
5 |
use esmith::ConfigDB; |
6 |
use esmith::util; |
7 |
|
8 |
+# Stop now if slapd.conf has syntax error |
9 |
+unless (system("/usr/sbin/slaptest -u 2>/dev/null") == 0){ |
10 |
+ die "Aborting ldap dump because of errors in slapd.conf\n"; |
11 |
+} |
12 |
+ |
13 |
my $c = esmith::ConfigDB->open_ro; |
14 |
my $domain = $c->get('DomainName') |
15 |
|| die("Couldn't determine domain name"); |
16 |
diff -Nur e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-dump e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/ldap-dump |
17 |
--- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-dump 2003-04-16 17:43:23.000000000 +0200 |
18 |
+++ e-smith-ldap-5.2.0_ldif/root/etc/e-smith/events/actions/ldap-dump 2010-12-30 19:29:56.000000000 +0100 |
19 |
@@ -27,6 +27,11 @@ |
20 |
use Errno; |
21 |
use esmith::ConfigDB; |
22 |
|
23 |
+# Stop now if slapd.conf has syntax error |
24 |
+unless (system("/usr/sbin/slaptest -u 2>/dev/null") == 0){ |
25 |
+ die "Aborting ldap dump because of errors in slapd.conf\n"; |
26 |
+} |
27 |
+ |
28 |
my $domain = esmith::ConfigDB->open->get('DomainName') |
29 |
|| die("Couldn't determine domain name"); |
30 |
$domain = $domain->value; |
31 |
diff -Nur e-smith-ldap-5.2.0/root/var/service/ldap/finish e-smith-ldap-5.2.0_ldif/root/var/service/ldap/finish |
32 |
--- e-smith-ldap-5.2.0/root/var/service/ldap/finish 2005-03-23 18:36:25.000000000 +0100 |
33 |
+++ e-smith-ldap-5.2.0_ldif/root/var/service/ldap/finish 2010-12-30 19:28:03.000000000 +0100 |
34 |
@@ -1,3 +1,3 @@ |
35 |
#! /bin/sh |
36 |
|
37 |
-exec /usr/sbin/slapcat -l ldif |
38 |
+/usr/sbin/slaptest -u 2>/dev/null && exec /usr/sbin/slapcat -l ldif |