12 . $SRCDIR/scripts/defines.sh $SRCDIR $BDB2
14 echo "Cleaning up in $DBDIR..."
18 echo "Starting slapd on TCP/IP port $PORT..."
19 $SLAPD -f $CONF -p $PORT -d $LVL > $MASTERLOG 2>&1 &
22 echo "Using ldapsearch to check that slapd is running..."
23 for i in 0 1 2 3 4 5; do
24 $LDAPSEARCH -L -b "$BASEDN" -h localhost -p $PORT \
25 'cn=Monitor' > /dev/null 2>&1
28 echo "Waiting 5 seconds for slapd to start..."
33 echo "Using ldapmodify to populate the database..."
34 $LDAPMODIFY -a -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
35 $LDIFORDERED > /dev/null 2>&1
38 echo "ldapmodify failed!"
43 echo "Using ldapsearch to read all the entries..."
44 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
45 'objectclass=*' | egrep -iv '^creatorsname:|^createtimestamp:' > \
51 echo "ldapsearch failed!"
55 echo "Filtering ldapsearch results..."
56 . $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
57 echo "Filtering original ldif used to create database..."
58 . $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
59 echo "Comparing filter output..."
60 cmp $SEARCHFLT $LDIFFLT
63 echo "comparison failed - database was not created correctly"
67 echo ">>>>> Test succeeded"