207
echo "Using ldapsearch to check that consumer1 slapd is running..."
208
for i in 0 1 2 3 4 5; do
209
$LDAPSEARCH -s base -b "" -H $URI2 \
210
'objectclass=*' > /dev/null 2>&1
212
if test $RC = 0 ; then
215
echo "Waiting 5 seconds for slapd to start..."
219
if test $RC != 0 ; then
220
echo "ldapsearch failed ($RC)!"
221
test $KILLSERVERS != no && kill -HUP $KILLPIDS
225
echo "Configuring syncrepl on consumer1..."
226
$LDAPMODIFY -D cn=config -H $URI2 -y $CONFIGPWF <<EOF >>$TESTOUT 2>&1
227
dn: olcDatabase={0}config,cn=config
230
olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
231
credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
232
retry="5 5 300 5" timeout=3
233
olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple
234
credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
235
retry="5 5 300 5" timeout=3
236
olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple
237
credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
238
retry="5 5 300 5" timeout=3
244
echo "Starting consumer2 slapd on TCP/IP port $PORT3..."
246
$SLAPD -F ./slapd.d -h $URI3 -d $LVL $TIMING > $LOG3 2>&1 &
248
if test $WAIT != 0 ; then
249
echo SLAVE2PID $SLAVE2PID
252
KILLPIDS="$KILLPIDS $SLAVE2PID"
257
echo "Using ldapsearch to check that consumer2 slapd is running..."
258
for i in 0 1 2 3 4 5; do
259
$LDAPSEARCH -s base -b "" -H $URI3 \
260
'objectclass=*' > /dev/null 2>&1
262
if test $RC = 0 ; then
265
echo "Waiting 5 seconds for slapd to start..."
269
if test $RC != 0 ; then
270
echo "ldapsearch failed ($RC)!"
271
test $KILLSERVERS != no && kill -HUP $KILLPIDS
275
echo "Configuring syncrepl on consumer2..."
276
$LDAPMODIFY -D cn=config -H $URI3 -y $CONFIGPWF <<EOF >>$TESTOUT 2>&1
277
dn: olcDatabase={0}config,cn=config
280
olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
281
credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
282
retry="5 5 300 5" timeout=3
283
olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple
284
credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
285
retry="5 5 300 5" timeout=3
286
olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple
287
credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
288
retry="5 5 300 5" timeout=3
294
echo "Adding schema and databases on producer..."
200
echo "Using ldapsearch to check that server $n is running..."
201
for i in 0 1 2 3 4 5; do
202
$LDAPSEARCH -s base -b "" -H $URI \
203
'objectclass=*' > /dev/null 2>&1
205
if test $RC = 0 ; then
208
echo "Waiting 5 seconds for slapd to start..."
212
if test $RC != 0 ; then
213
echo "ldapsearch failed ($RC)!"
214
test $KILLSERVERS != no && kill -HUP $KILLPIDS
218
echo "Configuring syncrepl on server $n..."
220
dn: olcDatabase={0}config,cn=config
225
while [ $j -le $MMR ]; do
226
P2=`expr $BASEPORT + $j`
227
U2="ldap://${LOCALHOST}:$P2/"
228
echo "olcSyncRepl: rid=00$j provider=$U2 binddn=\"cn=config\" bindmethod=simple" >> $TMP
229
echo " credentials=$CONFIGPW searchbase=\"cn=config\" type=refreshAndPersist" >> $TMP
230
echo " retry=\"3 10 300 5\" timeout=3" >> $TMP
238
$LDAPMODIFY -D cn=config -H $URI -y $CONFIGPWF < $TMP >>$TESTOUT 2>&1
242
echo "Adding schema and databases on server 1..."
295
243
$LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF <<EOF >>$TESTOUT 2>&1
296
244
include: file://$ABS_SCHEMADIR/core.ldif
380
echo "Using ldapadd to populate producer..."
329
echo "Using ldapadd to populate server 1..."
381
330
$LDAPADD -D "$MANAGERDN" -H $URI1 -w $PASSWD -f $LDIFORDERED \
384
333
if test $RC != 0 ; then
385
echo "ldapadd failed for producer database ($RC)!"
386
test $KILLSERVERS != no && kill -HUP $KILLPIDS
391
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
394
echo "Using ldapadd to populate consumer1..."
334
echo "ldapadd failed for server 1 database ($RC)!"
335
test $KILLSERVERS != no && kill -HUP $KILLPIDS
339
echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..."
343
while [ $n -le $MMR ]; do
344
PORT=`expr $BASEPORT + $n`
345
URI="ldap://${LOCALHOST}:$PORT/"
347
echo "Using ldapsearch to read config from server $n..."
348
$LDAPSEARCH -b cn=config -D cn=config -H $URI -y $CONFIGPWF \
349
'objectclass=*' > $TESTDIR/server$n.out 2>&1
352
if test $RC != 0 ; then
353
echo "ldapsearch failed at server $n ($RC)!"
354
test $KILLSERVERS != no && kill -HUP $KILLPIDS
358
. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
364
while [ $n -le $MMR ]; do
365
echo "Comparing retrieved configs from server 1 and server $n..."
366
$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
368
if test $? != 0 ; then
369
echo "test failed - server 1 and server $n configs differ"
370
test $KILLSERVERS != no && kill -HUP $KILLPIDS
377
while [ $n -le $MMR ]; do
378
PORT=`expr $BASEPORT + $n`
379
URI="ldap://${LOCALHOST}:$PORT/"
381
echo "Using ldapsearch to read all the entries from server $n..."
382
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI -w $PASSWD \
383
'objectclass=*' > $TESTDIR/server$n.out 2>&1
386
if test $RC != 0 ; then
387
echo "ldapsearch failed at server $n ($RC)!"
388
test $KILLSERVERS != no && kill -HUP $KILLPIDS
391
. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
396
while [ $n -le $MMR ]; do
397
echo "Comparing retrieved entries from server 1 and server $n..."
398
$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
400
if test $? != 0 ; then
401
echo "test failed - server 1 and server $n databases differ"
402
test $KILLSERVERS != no && kill -HUP $KILLPIDS
408
echo "Using ldapadd to populate server 2..."
395
409
$LDAPADD -D "$MANAGERDN" -H $URI2 -w $PASSWD -f $LDIFADD1 \
398
412
if test $RC != 0 ; then
399
echo "ldapadd failed for consumer1 database ($RC)!"
400
test $KILLSERVERS != no && kill -HUP $KILLPIDS
405
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
408
echo "Using ldapadd to populate consumer2..."
413
echo "ldapadd failed for server 2 database ($RC)!"
414
test $KILLSERVERS != no && kill -HUP $KILLPIDS
418
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
422
while [ $n -le $MMR ]; do
423
PORT=`expr $BASEPORT + $n`
424
URI="ldap://${LOCALHOST}:$PORT/"
426
echo "Using ldapsearch to read all the entries from server $n..."
427
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI -w $PASSWD \
428
'objectclass=*' > $TESTDIR/server$n.out 2>&1
431
if test $RC != 0 ; then
432
echo "ldapsearch failed at server $n ($RC)!"
433
test $KILLSERVERS != no && kill -HUP $KILLPIDS
436
. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
441
while [ $n -le $MMR ]; do
442
echo "Comparing retrieved entries from server 1 and server $n..."
443
$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
445
if test $? != 0 ; then
446
echo "test failed - server 1 and server $n databases differ"
447
test $KILLSERVERS != no && kill -HUP $KILLPIDS
453
echo "Using ldapadd to populate server 3..."
409
454
$LDAPADD -D "$MANAGERDN" -H $URI3 -w $PASSWD \
410
455
<< EOMODS >> $TESTOUT 2>&1
411
dn: cn=Consumer 2 Test,dc=example,dc=com
456
dn: cn=Server 3 Test,dc=example,dc=com
413
458
objectClass: device
417
462
if test $RC != 0 ; then
418
echo "ldapadd failed for consumer2 database ($RC)!"
419
test $KILLSERVERS != no && kill -HUP $KILLPIDS
424
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
427
echo "Using ldapmodify to add to the producer entries that will be deleted..."
463
echo "ldapadd failed for server 3 database ($RC)!"
464
test $KILLSERVERS != no && kill -HUP $KILLPIDS
468
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
472
while [ $n -le $MMR ]; do
473
PORT=`expr $BASEPORT + $n`
474
URI="ldap://${LOCALHOST}:$PORT/"
476
echo "Using ldapsearch to read all the entries from server $n..."
477
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI -w $PASSWD \
478
'objectclass=*' > $TESTDIR/server$n.out 2>&1
481
if test $RC != 0 ; then
482
echo "ldapsearch failed at server $n ($RC)!"
483
test $KILLSERVERS != no && kill -HUP $KILLPIDS
486
. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
491
while [ $n -le $MMR ]; do
492
echo "Comparing retrieved entries from server 1 and server $n..."
493
$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
495
if test $? != 0 ; then
496
echo "test failed - server 1 and server $n databases differ"
497
test $KILLSERVERS != no && kill -HUP $KILLPIDS
503
echo "Using ldapmodify to add to server 1 entries that will be deleted..."
428
504
$LDAPMODIFY -D "$MANAGERDN" -H $URI1 -w $PASSWD \
429
505
>> $TESTOUT 2>&1 << EOADDS
430
dn: cn=To be deleted by producer,dc=example,dc=com
433
# no distinguished values, will be added by DSA
435
dn: cn=To be deleted by consumer1,dc=example,dc=com
438
# no distinguished values, will be added by DSA
440
dn: cn=To be deleted by consumer2,dc=example,dc=com
443
# no distinguished values, will be added by DSA
445
dn: cn=To be deleted by producer,dc=example,dc=com
506
dn: cn=To be deleted by server 1,dc=example,dc=com
509
# no distinguished values, will be added by DSA
511
dn: cn=To be deleted by server 2,dc=example,dc=com
514
# no distinguished values, will be added by DSA
516
dn: cn=To be deleted by server 3,dc=example,dc=com
519
# no distinguished values, will be added by DSA
521
dn: cn=To be deleted by server 1,dc=example,dc=com
446
522
changetype: delete
449
525
if test $RC != 0 ; then
450
echo "ldapmodify failed for producer database ($RC)!"
451
test $KILLSERVERS != no && kill -HUP $KILLPIDS
456
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
459
echo "Using ldapmodify to delete entries from consumer1..."
526
echo "ldapmodify failed for server 1 database ($RC)!"
527
test $KILLSERVERS != no && kill -HUP $KILLPIDS
531
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
535
while [ $n -le $MMR ]; do
536
PORT=`expr $BASEPORT + $n`
537
URI="ldap://${LOCALHOST}:$PORT/"
539
echo "Using ldapsearch to read all the entries from server $n..."
540
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI -w $PASSWD \
541
'objectclass=*' > $TESTDIR/server$n.out 2>&1
544
if test $RC != 0 ; then
545
echo "ldapsearch failed at server $n ($RC)!"
546
test $KILLSERVERS != no && kill -HUP $KILLPIDS
549
. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
554
while [ $n -le $MMR ]; do
555
echo "Comparing retrieved entries from server 1 and server $n..."
556
$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
558
if test $? != 0 ; then
559
echo "test failed - server 1 and server $n databases differ"
560
test $KILLSERVERS != no && kill -HUP $KILLPIDS
566
echo "Using ldapmodify to delete entries from server 2..."
460
567
$LDAPMODIFY -D "$MANAGERDN" -H $URI2 -w $PASSWD \
461
568
>> $TESTOUT 2>&1 << EOADDS
462
dn: cn=To be deleted by consumer1,dc=example,dc=com
569
dn: cn=To be deleted by server 2,dc=example,dc=com
463
570
changetype: delete
466
573
if test $RC != 0 ; then
467
echo "ldapmodify failed for consumer1 database ($RC)!"
574
echo "ldapmodify failed for server 2 database ($RC)!"
468
575
test $KILLSERVERS != no && kill -HUP $KILLPIDS
473
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
579
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
476
echo "Using ldapmodify to delete entries from consumer2..."
582
echo "Using ldapmodify to delete entries from server 3..."
477
583
$LDAPMODIFY -D "$MANAGERDN" -H $URI3 -w $PASSWD \
478
584
>> $TESTOUT 2>&1 << EOADDS
479
dn: cn=To be deleted by consumer2,dc=example,dc=com
585
dn: cn=To be deleted by server 3,dc=example,dc=com
480
586
changetype: delete
483
589
if test $RC != 0 ; then
484
echo "ldapmodify failed for consumer2 database ($RC)!"
485
test $KILLSERVERS != no && kill -HUP $KILLPIDS
490
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
493
echo "Using ldapsearch to check that syncrepl received database changes..."
495
for i in 0 1 2 3 4 5; do
496
RESULT=`$LDAPSEARCH -H $URI2 \
497
-s base -b "cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com" \
498
'(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'`
499
if test "x$RESULT" = "xOK" ; then
503
echo "Waiting 5 seconds for syncrepl to receive changes..."
507
if test $RC != 0 ; then
508
echo "ldapsearch failed ($RC)!"
509
test $KILLSERVERS != no && kill -HUP $KILLPIDS
513
echo "Using ldapsearch to check that syncrepl received database changes on consumer2..."
515
for i in 0 1 2 3 4 5; do
516
RESULT=`$LDAPSEARCH -H $URI3 \
517
-s base -b "cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com" \
518
'(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'`
519
if test "x$RESULT" = "xOK" ; then
523
echo "Waiting 5 seconds for syncrepl to receive changes..."
527
if test $RC != 0 ; then
528
echo "ldapsearch failed ($RC)!"
529
test $KILLSERVERS != no && kill -HUP $KILLPIDS
533
echo "Using ldapsearch to read config from the producer..."
534
$LDAPSEARCH -b cn=config -D cn=config -H $URI1 -y $CONFIGPWF \
535
'objectclass=*' > $MASTEROUT 2>&1
538
if test $RC != 0 ; then
539
echo "ldapsearch failed at producer ($RC)!"
540
test $KILLSERVERS != no && kill -HUP $KILLPIDS
544
echo "Using ldapsearch to read config from consumer1..."
545
$LDAPSEARCH -b cn=config -D cn=config -H $URI2 -y $CONFIGPWF \
546
'objectclass=*' > $SLAVEOUT 2>&1
549
if test $RC != 0 ; then
550
echo "ldapsearch failed at consumer1 ($RC)!"
551
test $KILLSERVERS != no && kill -HUP $KILLPIDS
555
echo "Using ldapsearch to read config from consumer2..."
556
$LDAPSEARCH -b cn=config -D cn=config -H $URI3 -y $CONFIGPWF \
557
'objectclass=*' > $SLAVE2OUT 2>&1
560
if test $RC != 0 ; then
561
echo "ldapsearch failed at consumer2 ($RC)!"
562
test $KILLSERVERS != no && kill -HUP $KILLPIDS
566
echo "Filtering producer results..."
567
. $LDIFFILTER < $MASTEROUT > $MASTERFLT
568
echo "Filtering consumer1 results..."
569
. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT
570
echo "Filtering consumer2 results..."
571
. $LDIFFILTER < $SLAVE2OUT > $SLAVE2FLT
573
echo "Comparing retrieved configs from producer and consumer1..."
574
$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
576
if test $? != 0 ; then
577
echo "test failed - producer and consumer1 configs differ"
578
test $KILLSERVERS != no && kill -HUP $KILLPIDS
582
echo "Comparing retrieved configs from producer and consumer2..."
583
$CMP $MASTERFLT $SLAVE2FLT > $CMPOUT
585
if test $? != 0 ; then
586
echo "test failed - producer and consumer2 configs differ"
587
test $KILLSERVERS != no && kill -HUP $KILLPIDS
591
echo "Using ldapsearch to read all the entries from the producer..."
592
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI1 -w $PASSWD \
593
'objectclass=*' > $MASTEROUT 2>&1
596
if test $RC != 0 ; then
597
echo "ldapsearch failed at producer ($RC)!"
598
test $KILLSERVERS != no && kill -HUP $KILLPIDS
602
echo "Using ldapsearch to read all the entries from consumer1..."
603
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI2 -w $PASSWD \
604
'objectclass=*' > $SLAVEOUT 2>&1
607
if test $RC != 0 ; then
608
echo "ldapsearch failed at consumer1 ($RC)!"
609
test $KILLSERVERS != no && kill -HUP $KILLPIDS
613
echo "Using ldapsearch to read all the entries from consumer2..."
614
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI3 -w $PASSWD \
615
'objectclass=*' > $SLAVE2OUT 2>&1
618
if test $RC != 0 ; then
619
echo "ldapsearch failed at consumer2 ($RC)!"
620
test $KILLSERVERS != no && kill -HUP $KILLPIDS
590
echo "ldapmodify failed for server 3 database ($RC)!"
591
test $KILLSERVERS != no && kill -HUP $KILLPIDS
595
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
599
while [ $n -le $MMR ]; do
600
PORT=`expr $BASEPORT + $n`
601
URI="ldap://${LOCALHOST}:$PORT/"
603
echo "Using ldapsearch to read all the entries from server $n..."
604
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI -w $PASSWD \
605
'objectclass=*' > $TESTDIR/server$n.out 2>&1
608
if test $RC != 0 ; then
609
echo "ldapsearch failed at server $n ($RC)!"
610
test $KILLSERVERS != no && kill -HUP $KILLPIDS
613
. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt
618
while [ $n -le $MMR ]; do
619
echo "Comparing retrieved entries from server 1 and server $n..."
620
$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
622
if test $? != 0 ; then
623
echo "test failed - server 1 and server $n databases differ"
624
test $KILLSERVERS != no && kill -HUP $KILLPIDS
625
631
# test $KILLSERVERS != no && kill -HUP $KILLPIDS
626
632
kill -HUP $KILLPIDS
628
echo "Filtering producer results..."
629
. $LDIFFILTER < $MASTEROUT > $MASTERFLT
630
echo "Filtering consumer1 results..."
631
. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT
632
echo "Filtering consumer2 results..."
633
. $LDIFFILTER < $SLAVE2OUT > $SLAVE2FLT
635
echo "Comparing retrieved entries from producer and consumer1..."
636
$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
638
if test $? != 0 ; then
639
echo "test failed - producer and consumer1 databases differ"
643
echo "Comparing retrieved entries from producer and consumer2..."
644
$CMP $MASTERFLT $SLAVE2FLT > $CMPOUT
646
if test $? != 0 ; then
647
echo "test failed - producer and consumer2 databases differ"
652
635
# test $KILLSERVERS != no && wait
655
638
echo "Restarting servers..."
656
echo "Starting producer slapd on TCP/IP port $PORT1..."
658
echo "======================= RESTART =======================" >> $LOG1
659
$SLAPD -F ./slapd.d -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
641
while [ $n -le $MMR ]; do
642
PORT=`expr $BASEPORT + $n`
643
URI="ldap://${LOCALHOST}:$PORT/"
644
LOG=$TESTDIR/slapd.$n.log
645
echo "Starting server $n on TCP/IP port $PORT..."
647
echo "======================= RESTART =======================" >> $LOG
648
$SLAPD -F ./slapd.d -h $URI -d $LVL $TIMING >> $LOG 2>&1 &
661
650
if test $WAIT != 0 ; then
667
echo "Using ldapsearch to check that producer slapd is running..."
668
for i in 0 1 2 3 4 5; do
669
$LDAPSEARCH -s base -b "" -H $URI1 \
670
'objectclass=*' > /dev/null 2>&1
672
if test $RC = 0 ; then
675
echo "Waiting 5 seconds for slapd to start..."
679
if test $RC != 0 ; then
680
echo "ldapsearch failed ($RC)!"
681
test $KILLSERVERS != no && kill -HUP $KILLPIDS
685
echo "Starting consumer1 slapd on TCP/IP port $PORT2..."
687
echo "======================= RESTART =======================" >> $LOG2
688
$SLAPD -F ./slapd.d -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 &
690
if test $WAIT != 0 ; then
691
echo SLAVEPID $SLAVEPID
694
KILLPIDS="$KILLPIDS $SLAVEPID"
699
echo "Using ldapsearch to check that consumer1 slapd is running..."
700
for i in 0 1 2 3 4 5; do
701
$LDAPSEARCH -s base -b "" -H $URI2 \
702
'objectclass=*' > /dev/null 2>&1
704
if test $RC = 0 ; then
707
echo "Waiting 5 seconds for slapd to start..."
711
if test $RC != 0 ; then
712
echo "ldapsearch failed ($RC)!"
713
test $KILLSERVERS != no && kill -HUP $KILLPIDS
717
echo "Starting consumer2 slapd on TCP/IP port $PORT3..."
719
echo "======================= RESTART =======================" >> $LOG3
720
$SLAPD -F ./slapd.d -h $URI3 -d $LVL $TIMING >> $LOG3 2>&1 &
722
if test $WAIT != 0 ; then
723
echo SLAVE2PID $SLAVE2PID
726
KILLPIDS="$KILLPIDS $SLAVE2PID"
731
echo "Using ldapsearch to check that consumer2 slapd is running..."
732
for i in 0 1 2 3 4 5; do
733
$LDAPSEARCH -s base -b "" -H $URI3 \
734
'objectclass=*' > /dev/null 2>&1
736
if test $RC = 0 ; then
739
echo "Waiting 5 seconds for slapd to start..."
743
if test $RC != 0 ; then
744
echo "ldapsearch failed ($RC)!"
745
test $KILLSERVERS != no && kill -HUP $KILLPIDS
654
KILLPIDS="$KILLPIDS $PID"
656
echo "Using ldapsearch to check that server $n is running..."
657
for i in 0 1 2 3 4 5; do
658
$LDAPSEARCH -s base -b "" -H $URI \
659
'objectclass=*' > /dev/null 2>&1
661
if test $RC = 0 ; then
664
echo "Waiting 5 seconds for slapd to start..."
668
if test $RC != 0 ; then
669
echo "ldapsearch failed ($RC)!"
670
test $KILLSERVERS != no && kill -HUP $KILLPIDS
749
676
# Insert modifications and more tests here.
751
echo "Waiting $SLEEP seconds for servers to resync..."
677
echo "Waiting $SLEEP1 seconds for servers to resync..."
754
680
test $KILLSERVERS != no && kill -HUP $KILLPIDS