4 echo "running defines.sh"
5 . $SRCDIR/scripts/defines.sh
7 mkdir -p $TESTDIR $DBDIR1
9 echo "Running slapadd to build slapd database..."
10 . $CONFFILTER $BACKEND < $CONF > $ADDCONF
11 $SLAPADD -f $ADDCONF -l $LDIFORDERED
13 if test $RC != 0 ; then
14 echo "slapadd failed ($RC)!"
18 echo "Starting slapd on TCP/IP port $PORT1..."
19 . $CONFFILTER $BACKEND < $CONF > $CONF1
20 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> /dev/null 2>&1 &
23 echo "Using ldapsearch to retrieve all the entries..."
24 for i in 0 1 2 3 4 5; do
25 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1
27 if test $RC = 1 ; then
28 echo "Waiting 5 seconds for slapd to start..."
33 if test $RC != 0 ; then
34 echo "ldapsearch failed ($RC)!"
38 echo "Filtering ldapsearch results..."
39 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
40 echo "Filtering original ldif used to create database..."
41 . $LDIFFILTER < $LDIF > $LDIFFLT
42 echo "Comparing filter output..."
43 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
45 if test $? != 0 ; then
46 echo "comparison failed - database was not created correctly"
50 echo ">>>>> Server1 (pid=$PID) started"