6 echo "Cleaning up in $DBDIR..."
10 echo "Starting slapd on TCP/IP port $PORT..."
11 $SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
14 echo "Using ldapsearch to check that slapd is running..."
15 for i in 0 1 2 3 4 5; do
16 $LDAPSEARCH -L -b "$BASEDN" -h localhost -p $PORT \
17 'cn=Monitor' > /dev/null 2>&1
20 echo "Waiting 5 seconds for slapd to start..."
25 echo "Using ldapmodify to populate the database..."
26 $LDAPMODIFY -a -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
27 $LDIFORDERED > /dev/null 2>&1
30 echo "ldapmodify failed!"
35 echo "Using ldapsearch to read all the entries..."
36 $LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
37 'objectclass=*' | egrep -iv '^creatorsname:|^createtimestamp:' > \
43 echo "ldapsearch failed!"
47 echo "Filtering ldapsearch results..."
48 . scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
49 echo "Filtering original ldif used to create database..."
50 . scripts/acfilter.sh < $LDIF > $LDIFFLT
51 echo "Comparing filter output..."
52 cmp $SEARCHFLT $LDIFFLT
54 echo "comparison failed - database was not created correctly"
58 echo ">>>>> Test succeeded"