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