6 echo "Cleaning up in $DBDIR..."
10 echo "Starting slapd on TCP/IP port $PORT..."
11 $SLAPD -f $CONF -p $PORT -d 1 > /dev/null 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 "Comparing retrieved entries to LDIF file used to create database"
50 echo "comparison failed - database was not created correctly"
54 echo ">>>>> Test succeeded"