#! /bin/sh
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-## Copyright 2004-2005 The OpenLDAP Foundation.
+## Copyright 2004-2007 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
fi
DN="dc=example,dc=com"
-echo "Searching database for uniqueMember~=\"$DN\" (approx) ..."
-echo "# Searching database for uniqueMember~=\"$DN\" (approx) ..." >> $SEARCHOUT
+echo "Searching database for uniqueMember~=\"$DN\" (approx)..."
+echo "# Searching database for uniqueMember~=\"$DN\" (approx)..." >> $SEARCHOUT
$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
"(uniqueMember~=)" >> $SEARCHOUT 2>&1
fi
DN="dc=example,dc=com#'001000'B"
-echo "Searching database for uniqueMember~=\"$DN\" (approx) ..."
-echo "# Searching database for uniqueMember~=\"$DN\" (approx) ..." >> $SEARCHOUT
+echo "Searching database for uniqueMember~=\"$DN\" (approx)..."
+echo "# Searching database for uniqueMember~=\"$DN\" (approx)..." >> $SEARCHOUT
$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
"(uniqueMember~=$DN)" >> $SEARCHOUT 2>&1
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-LDIFOUT=$DNOUT
-
echo "Filtering ldapsearch results..."
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original data..."
+. $LDIFFILTER < $DNOUT > $LDIFFLT
echo "Comparing ldapsearch results against original..."
-$CMP $SEARCHFLT $LDIFOUT > $CMPOUT
+$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
if test $? != 0 ; then
echo "comparison failed - DN write operations did not complete correctly"
#####
echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
exit 0