1#! /bin/sh 2# OpenLDAP: pkg/ldap/tests/scripts/start-server2,v 1.5.2.5 2010/04/13 20:24:00 kurt Exp 3## This work is part of OpenLDAP Software <http://www.openldap.org/>. 4## 5## Copyright 1998-2010 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 16echo "running defines.sh" 17. $SRCDIR/scripts/defines.sh 18 19mkdir -p $TESTDIR $DBDIR2 20 21echo "Starting slapd on TCP/IP port $PORT2..." 22. $CONFFILTER $BACKEND < $CONFTWO > $CONF2 23$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 & 24PID=$! 25 26echo "Using ldapsearch to retrieve all the entries..." 27for i in 0 1 2 3 4 5; do 28 $LDAPSEARCH -S "" -b "" -s base -h $LOCALHOST -p $PORT2 > $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 34done 35 36if test $RC != 0 ; then 37 echo "ldapsearch failed ($RC)!" 38 exit $RC 39fi 40 41echo ">>>>> Server2 (pid=$PID) started" 42exit 0 43