9 . $SRCDIR/scripts/defines.sh $SRCDIR
11 echo "Cleaning up in $DBDIR..."
15 echo "Starting slapd on TCP/IP port $PORT..."
16 $SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
19 echo "Using ldapsearch to check that slapd is running..."
20 for i in 0 1 2 3 4 5; do
21 $LDAPSEARCH -L -b "$BASEDN" -h localhost -p $PORT \
22 'cn=Monitor' > /dev/null 2>&1
25 echo "Waiting 5 seconds for slapd to start..."
30 echo "Using ldapmodify to populate the database..."
31 $LDAPMODIFY -a -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
32 $LDIFORDERED > /dev/null 2>&1
35 echo "ldapmodify failed!"
40 echo "Using ldapsearch to read all the entries..."
41 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
42 'objectclass=*' | egrep -iv '^creatorsname:|^createtimestamp:' > \
48 echo "ldapsearch failed!"
52 echo "Filtering ldapsearch results..."
53 . $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
54 echo "Filtering original ldif used to create database..."
55 . $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
56 echo "Comparing filter output..."
57 cmp $SEARCHFLT $LDIFFLT
60 echo "comparison failed - database was not created correctly"
64 echo ">>>>> Test succeeded"