| 1 |
#! /bin/sh |
| 2 |
# $OpenLDAP$ |
| 3 |
## This work is part of OpenLDAP Software <http://www.openldap.org/>. |
| 4 |
## |
| 5 |
## Copyright 1998-2024 The OpenLDAP Foundation. |
| 6 |
## All rights reserved. |
| 7 |
## |
| 8 |
## Redistribution and use in source and binary forms, with or without |
| 9 |
## modification, are permitted only as authorized by the OpenLDAP |
| 10 |
## Public License. |
| 11 |
## |
| 12 |
## A copy of this license is available in the file LICENSE in the |
| 13 |
## top-level directory of the distribution or, alternatively, at |
| 14 |
## <http://www.OpenLDAP.org/license.html>. |
| 15 |
|
| 16 |
echo "running defines.sh" |
| 17 |
. $SRCDIR/scripts/defines.sh |
| 18 |
|
| 19 |
mkdir -p $TESTDIR $DBDIR2 |
| 20 |
|
| 21 |
echo "Starting slapd on TCP/IP port $PORT2..." |
| 22 |
. $CONFFILTER $BACKEND < $CONFTWO > $CONF2 |
| 23 |
$SLAPD -f $CONF2 -h $URI2 -d $LVL > $LOG2 2>&1 & |
| 24 |
PID=$! |
| 25 |
|
| 26 |
echo "Using ldapsearch to retrieve all the entries..." |
| 27 |
for i in 0 1 2 3 4 5; do |
| 28 |
$LDAPSEARCH -S "" -b "" -s base -H $URI2 > $SERVER2OUT 2>&1 |
| 29 |
RC=$? |
| 30 |
if test $RC = 1 ; then |
| 31 |
echo "Waiting 5 seconds for slapd to start..." |
| 32 |
sleep 5 |
| 33 |
fi |
| 34 |
done |
| 35 |
|
| 36 |
if test $RC != 0 ; then |
| 37 |
echo "ldapsearch failed ($RC)!" |
| 38 |
exit $RC |
| 39 |
fi |
| 40 |
|
| 41 |
echo ">>>>> Server2 (pid=$PID) started" |
| 42 |
exit 0 |