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