Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / openldap / dist / tests / scripts / start-server2-nolog
blobc733c7f97beb03edf5e7b7743068ff28bec4309b
1 #! /bin/sh
2 # $OpenLDAP: pkg/ldap/tests/scripts/start-server2-nolog,v 1.5.2.3 2008/02/11 23:26:50 kurt Exp $
3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ##
5 ## Copyright 1998-2008 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.
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>.
16 echo "running defines.sh"
17 . $SRCDIR/scripts/defines.sh
19 mkdir -p $TESTDIR $DBDIR2
21 echo "Starting slapd on TCP/IP port $PORT2..."
22 . $CONFFILTER $BACKEND < $CONFTWO > $CONF2
23 $SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > /dev/null 2>&1 &
24 PID=$!
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 $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
34 done
36 if test $RC != 0 ; then
37 echo "ldapsearch failed ($RC)!"
38 exit $RC
41 echo ">>>>> Server2 (pid=$PID) started"
42 exit 0