s4:dsdb/repl_meta_data: always treat the highwatermark as opaque (bug #9508)
[Samba/gebeck_regimport.git] / lib / ldb / tests / init_slapd.sh
blobcf06acd08b9cb2360f304286634746484aa25d1a
1 #!/bin/sh
3 if [ -z "$LDBDIR" ]; then
4 LDBDIR=`dirname $0`/..
5 export LDBDIR
6 fi
8 rm -rf tests/tmp/db
9 mkdir -p tests/tmp/db
11 if [ -f tests/tmp/slapd.pid ]; then
12 kill `cat tests/tmp/slapd.pid`
13 sleep 1
15 if [ -f tests/tmp/slapd.pid ]; then
16 kill -9 `cat tests/tmp/slapd.pid`
17 rm -f tests/tmp/slapd.pid
20 # we don't consider a slapadd failure as a test suite failure, as it
21 # has nothing to do with ldb
23 MODCONF=tests/tmp/modules.conf
24 rm -f $MODCONF
25 touch $MODCONF || exit 1
27 slaptest -u -f $LDBDIR/tests/slapd.conf > /dev/null 2>&1 || {
28 echo "enabling sladp modules"
29 cat > $MODCONF <<EOF
30 modulepath /usr/lib/ldap
31 moduleload back_bdb
32 EOF
35 slaptest -u -f $LDBDIR/tests/slapd.conf || {
36 echo "slaptest failed - skipping ldap tests"
37 exit 0
40 slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 0