one set of slapd.conf files.
# ldbm database definitions
#######################################################################
-database ldbm
+database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db
# ldbm database definitions
#######################################################################
-database ldbm
+database @BACKEND@
suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
# ldbm database definitions
#######################################################################
-database ldbm
+database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db
referral "ldap://localhost:9009/"
-database ldbm
+database @BACKEND@
cachesize 0
suffix "o=University of Mich, c=US"
directory ./test-repl
# ldbm database definitions
#######################################################################
-database ldbm
+database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db
# ldbm database definitions
#######################################################################
-database ldbm
+database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-repl
# ldbm database definitions
#######################################################################
-database ldbm
+database @BACKEND@
suffix "o=OpenLDAP Project, l=Internet"
directory ./test-db
# ldbm database definitions
#######################################################################
-database ldbm
+database @BACKEND@
suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
index objectclass eq
index uid pres,eq,sub
index cn,sn pres,eq,sub,subany
-dbnosync
-dbnolocking
+#LDBM#dbnosync
+#LDBM#dbnolocking
--- /dev/null
+#! /bin/sh
+# $OpenLDAP$
+sed -e s%@BACKEND@%$BACKEND% -e s%#$BACKEND#%%
DATADIR=$SRCDIR/data
PROGDIR=./progs
+DBDIR=./test-db
+REPLDIR=./test-repl
+
+CONF=$DATADIR/slapd.conf
+MCONF=$DATADIR/slapd-master.conf
+PWCONF=$DATADIR/slapd-pw.conf
+ACLCONF=$DATADIR/slapd-acl.conf
+MASTERCONF=$DATADIR/slapd-repl-master.conf
+SLAVECONF=$DATADIR/slapd-repl-slave.conf
+REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
+SCHEMACONF=$DATADIR/slapd-schema.conf
-if test "$BACKEND" = "bdb2" ; then
- CONF=$DATADIR/slapd-bdb2-master.conf
- PWCONF=$DATADIR/slapd-bdb2-pw.conf
- ACLCONF=$DATADIR/slapd-bdb2-acl.conf
- MASTERCONF=$DATADIR/slapd-bdb2-repl-master.conf
- SLAVECONF=$DATADIR/slapd-bdb2-repl-slave.conf
- REFSLAVECONF=$DATADIR/slapd-bdb2-ref-slave.conf
- SCHEMACONF=$DATADIR/slapd-bdb2-schema.conf
- TIMING="-t"
-else
- CONF=$DATADIR/slapd.conf
- MCONF=$DATADIR/slapd-master.conf
- PWCONF=$DATADIR/slapd-pw.conf
- ACLCONF=$DATADIR/slapd-acl.conf
- MASTERCONF=$DATADIR/slapd-repl-master.conf
- SLAVECONF=$DATADIR/slapd-repl-slave.conf
- REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
- SCHEMACONF=$DATADIR/slapd-schema.conf
-fi
+DBCONF=$DBDIR/slapd.conf
+ADDCONF=$DBDIR/slapadd.conf
+REPLCONF=$REPLDIR/slapd.conf
TOOLARGS="-x $LDAP_TOOLARGS"
TOOLPROTO="-P 3"
CLIENTDIR=../clients/tools
#CLIENTDIR=/usr/local/bin
+LDIFFILTER=$SRCDIR/scripts/acfilter.sh
+CONFFILTER=$SRCDIR/scripts/conf.sh
+
SLAPADD="../servers/slapd/tools/slapadd $LDAP_VERBOSE"
SLAPCAT="../servers/slapd/tools/slapcat $LDAP_VERBOSE"
SLAPINDEX="../servers/slapd/tools/slapindex $LDAP_VERBOSE"
SLAVEPORT=9010
MASTERURI="ldap://localhost:$PORT/"
SLAVEURI="ldap://localhost:$SLAVEPORT/"
-DBDIR=./test-db
-REPLDIR=./test-repl
LDIF=$DATADIR/test.ldif
LDIFORDERED=$DATADIR/test-ordered.ldif
LDIFPASSWD=$DATADIR/passwd.ldif
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
-
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $SCHEMACONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+. $CONFFILTER $BACKEND < $SCHEMACONF > $DBCONF
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to retrieve all the entries..."
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
-
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
-$SLAPADD -f $CONF -l $LDIFORDERED
+. $CONFFILTER $BACKEND < $CONF > $ADDCONF
+$SLAPADD -f $ADDCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
fi
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+. $CONFFILTER $BACKEND < $CONF > $DBCONF
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to retrieve all the entries..."
fi
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+. $CONFFILTER $BACKEND < $CONF > $DBCONF
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."
fi
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
-$SLAPADD -f $MCONF -l $LDIFORDERED
+. $CONFFILTER $BACKEND < $MCONF > $ADDCONF
+$SLAPADD -f $ADDCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
fi
echo "Running slapindex to index slapd database..."
-$SLAPINDEX -f $CONF
+. $CONFFILTER $BACKEND < $CONF > $DBCONF
+$SLAPINDEX -f $DBCONF
RC=$?
if test $RC != 0 ; then
echo "warning: slapindex failed ($RC)"
fi
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd searching..."
LDIF=$SEARCHOUTMASTER
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
+echo "running defines.sh"
+. $SRCDIR/scripts/defines.sh
+
echo "running defines.sh $SRCDIR $BACKEND"
. $SRCDIR/scripts/defines.sh
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
-$SLAPADD -f $CONF -l $LDIFORDERED
+. $CONFFILTER $BACKEND < $CONF > $DBCONF
+$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
fi
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd modify operations..."
LDIF=$MODIFYOUTMASTER
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
-$SLAPADD -f $CONF -l $LDIFORDERED
+. $CONFFILTER $BACKEND < $CONF > $DBCONF
+$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
fi
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd modrdn operations..."
LDIF=$MODRDNOUTMASTER1
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
LDIF=$MODRDNOUTMASTER2
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
LDIF=$MODRDNOUTMASTER0
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
LDIF=$MODRDNOUTMASTER3
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
-$SLAPADD -f $CONF -l $LDIFORDERED
+. $CONFFILTER $BACKEND < $ACLCONF > $DBCONF
+$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
fi
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $ACLCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd access control..."
echo "Using ldapsearch to retrieve all the entries..."
$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
- 'objectClass=*' | . $SRCDIR/scripts/acfilter.sh >> $SEARCHOUT 2>&1
+ 'objectClass=*' | . $LDIFFILTER >> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
if test $RC != 0 ; then
LDIF=$ACLOUTMASTER
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
+SRCDIR="."
+if test $# -ge 1 ; then
+ SRCDIR=$1; shift
+fi
+BACKEND=ldbm
+if test $# -ge 1 ; then
+ BACKEND=$1; shift
+fi
+
+echo "running defines.sh"
+. $SRCDIR/scripts/defines.sh
+
#
# Test replication:
# - start master
# - retrieve database over ldap and compare against expected results
#
-if test $# -eq 0 ; then
- SRCDIR="."
-else
- SRCDIR=$1; shift
-fi
-if test $# -eq 1 ; then
- BACKEND=$1; shift
-fi
-
-echo "running defines.sh $SRCDIR $BACKEND"
-. $SRCDIR/scripts/defines.sh
-
if test ! -x $SLURPD ; then
echo ">>>>> $SLURPD is not executable or do not exist."
echo ">>>>> Test skipped."
rm -f $REPLDIR/[!C]*
echo "Starting master slapd on TCP/IP port $PORT..."
-$SLAPD -f $MASTERCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+. $CONFFILTER $BACKEND < $MASTERCONF > $DBCONF
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
-$SLAPD -f $SLAVECONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
+. $CONFFILTER $BACKEND < $SLAVECONF > $REPLCONF
+$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
SLAVEPID=$!
echo "Using ldapsearch to check that master slapd is running..."
LDIF=$SLAVEOUT
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing retrieved entries from master and slave..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
-
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
-$SLAPADD -f $CONF -l $LDIFORDERED
+. $CONFFILTER $BACKEND < $CONF > $DBCONF
+$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
sleep 5
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."
fi
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-#
-# Test default referral
-#
-
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
+#
+# Test default referral
+#
+
+
echo "Cleaning up in $DBDIR and $REPLDIR ..."
rm -f $DBDIR/[!C]*
rm -f $REPLDIR/[!C]*
echo "Running slapadd to build slapd database..."
-$SLAPADD -f $CONF -l $LDIFORDERED
+. $CONFFILTER $BACKEND < $CONF > $DBCONF
+$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
fi
echo "Starting master slapd on TCP/IP port $PORT..."
-$SLAPD -n master -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -n master -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
-$SLAPD -n slave -f $REFSLAVECONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
+. $CONFFILTER $BACKEND < $REFSLAVECONF > $REPLCONF
+$SLAPD -n slave -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
SLAVEPID=$!
echo "Testing for master slapd..."
LDIF=$SEARCHOUTMASTER
echo "Filtering ldapsearch results..."
-. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
#! /bin/sh
# $OpenLDAP$
-if test $# -eq 0 ; then
- SRCDIR="."
-else
+SRCDIR="."
+if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
-if test $# -eq 1 ; then
+BACKEND=ldbm
+if test $# -ge 1 ; then
BACKEND=$1; shift
fi
-echo "running defines.sh $SRCDIR $BACKEND"
+echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $PWCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
+. $CONFFILTER $PWCONF < $CONF > $DBCONF
+$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."