version 1.9, 2002/01/21 05:35:04
|
version 1.9.2.2, 2002/09/01 22:02:30
|
Line 1
|
Line 1
|
#! /bin/sh |
#! /bin/sh |
# $OpenLDAP: pkg/ldap/tests/scripts/test000-rootdse,v 1.8 2002/01/15 16:26:51 kurt Exp $ |
# $OpenLDAP: pkg/ldap/tests/scripts/test000-rootdse,v 1.9.2.1 2002/06/20 20:12:35 kurt Exp $ |
|
|
SRCDIR="." |
SRCDIR="." |
if test $# -ge 1 ; then |
if test $# -ge 1 ; then |
Line 9 BACKEND=bdb
|
Line 9 BACKEND=bdb
|
if test $# -ge 1 ; then |
if test $# -ge 1 ; then |
BACKEND=$1; shift |
BACKEND=$1; shift |
fi |
fi |
|
MONITORDB=no |
|
if test $# -ge 1 ; then |
|
MONITORDB=$1; shift |
|
fi |
|
|
WAIT=0 |
WAIT=0 |
if test $# -ge 1 ; then |
if test $# -ge 1 ; then |
Line 25 echo "Cleaning up in $DBDIR..."
|
Line 29 echo "Cleaning up in $DBDIR..."
|
rm -f $DBDIR/[!C]* |
rm -f $DBDIR/[!C]* |
|
|
echo "Starting slapd on TCP/IP port $PORT..." |
echo "Starting slapd on TCP/IP port $PORT..." |
. $CONFFILTER $BACKEND < $SCHEMACONF > $DBCONF |
. $CONFFILTER $BACKEND $MONITORDB < $SCHEMACONF > $DBCONF |
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 & |
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 & |
PID=$! |
PID=$! |
if test $WAIT != 0 ; then |
if test $WAIT != 0 ; then |
Line 33 if test $WAIT != 0 ; then
|
Line 37 if test $WAIT != 0 ; then
|
read foo |
read foo |
fi |
fi |
|
|
echo "Using ldapsearch to retrieve all the entries..." |
echo "Using ldapsearch to retrieve the root DSE..." |
for i in 0 1 2 3 4 5; do |
for i in 0 1 2 3 4 5; do |
$LDAPSEARCH -b "" -s base -h $LOCALHOST -p $PORT 'extensibleObject' > $SEARCHOUT 2>&1 |
$LDAPSEARCH -b "" -s base -h $LOCALHOST -p $PORT 'extensibleObject' > $SEARCHOUT 2>&1 |
RC=$? |
RC=$? |
if test $RC = 1 ; then |
if test $RC = 0 ; then |
echo "Waiting 5 seconds for slapd to start..." |
break |
sleep 5 |
|
fi |
fi |
|
echo "Waiting 5 seconds for slapd to start..." |
|
sleep 5 |
done |
done |
|
|
|
if test $RC = 0 -a $MONITORDB = yes ; then |
|
echo "Using ldapsearch to retrieve the cn=Monitor..." |
|
$LDAPSEARCH -b "cn=Monitor" -s base -h $LOCALHOST -p $PORT 'extensibleObject' >> $SEARCHOUT 2>&1 |
|
RC=$? |
|
fi |
|
|
kill -HUP $PID |
kill -HUP $PID |
|
|
cat $SEARCHOUT |
cat $SEARCHOUT |