Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / openldap / dist / tests / scripts / sql-test901-syncrepl
blobd295cc19fcb1cdb9ee0d9611db87b5d8dd258561
1 #! /bin/sh
2 # $OpenLDAP: pkg/ldap/tests/scripts/sql-test901-syncrepl,v 1.4.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 if test $BACKSQL = "sqlno" ; then
20 echo "SQL backend not available, test skipped"
21 exit 0
22 fi
24 if test $RDBMS = "rdbmsno" ; then
25 echo "SQL test not requested, test skipped"
26 exit 0
29 if test "${RDBMSWRITE}" != "yes"; then
30 echo "write test disabled for ${RDBMS}; set SLAPD_USE_SQLWRITE=yes to enable"
31 exit 0
34 mkdir -p $TESTDIR $DBDIR2A
36 echo "Starting slapd on TCP/IP port $PORT1..."
37 . $CONFFILTER $BACKEND $MONITORDB < $SQLSRMASTERCONF > $CONF1
38 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
39 PID=$!
40 if test $WAIT != 0 ; then
41 echo PID $PID
42 read foo
44 KILLPIDS="$PID"
46 echo "Testing SQL backend write operations..."
47 for i in 0 1 2 3 4 5; do
48 $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
49 'objectclass=*' > /dev/null 2>&1
50 RC=$?
51 if test $RC = 0 ; then
52 break
54 echo "Waiting 5 seconds for slapd to start..."
55 sleep 5
56 done
58 if test $RC != 0 ; then
59 echo "ldapsearch failed ($RC)!"
60 test $KILLSERVERS != no && kill -HUP $KILLPIDS
61 exit $RC
64 echo "Starting slave slapd on TCP/IP port $PORT2..."
65 . $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $CONF2
66 $SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
67 SLAVEPID=$!
68 if test $WAIT != 0 ; then
69 echo SLAVEPID $SLAVEPID
70 read foo
72 KILLPIDS="$KILLPIDS $SLAVEPID"
74 echo "Using ldapsearch to check that slave slapd is running..."
75 for i in 0 1 2 3 4 5; do
76 $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
77 'objectclass=*' > /dev/null 2>&1
78 RC=$?
79 if test $RC = 0 ; then
80 break
82 echo "Waiting 5 seconds for slapd to start..."
83 sleep 5
84 done
86 if test $RC != 0 ; then
87 echo "ldapsearch failed ($RC)!"
88 test $KILLSERVERS != no && kill -HUP $KILLPIDS
89 exit $RC
92 cat /dev/null > $SEARCHOUT
94 echo "Using ldapsearch to retrieve all the entries from the master..."
95 echo "# Using ldapsearch to retrieve all the entries from the master..." \
96 >> $SEARCHOUT
97 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
98 -D "$MANAGERDN" -w $PASSWD \
99 "(!(objectClass=referral))" >> $SEARCHOUT 2>&1
101 RC=$?
102 if test $RC != 0 ; then
103 echo "ldapsearch failed ($RC)!"
104 test $KILLSERVERS != no && kill -HUP $KILLPIDS
105 exit $RC
108 cat /dev/null > $SEARCHOUT2
110 echo "Using ldapsearch to retrieve all the entries from the slave..."
111 echo "# Using ldapsearch to retrieve all the entries from the slave..." \
112 >> $SEARCHOUT2
113 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT2 -b "$BASEDN" \
114 -D "$UPDATEDN" -w $PASSWD \
115 "(objectClass=*)" >> $SEARCHOUT2 2>&1
117 RC=$?
118 if test $RC != 0 ; then
119 echo "ldapsearch failed ($RC)!"
120 test $KILLSERVERS != no && kill -HUP $KILLPIDS
121 exit $RC
124 echo "Filtering ldapsearch results from master..."
125 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
126 echo "Filtering ldapsearch results from slave..."
127 . $LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2
128 echo "Comparing filter output..."
129 $CMP $SEARCHFLT $SEARCHFLT2 > $CMPOUT
131 if test $? != 0 ; then
132 echo "Comparison failed"
133 test $KILLSERVERS != no && kill -HUP $KILLPIDS
134 exit 1
137 cat /dev/null > $SEARCHOUT
139 echo "Using ldapsearch to retrieve all the entries..."
140 echo "# Using ldapsearch to retrieve all the entries..." >> $SEARCHOUT
141 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
142 "objectClass=*" >> $SEARCHOUT 2>&1
144 RC=$?
145 if test $RC != 0 ; then
146 echo "ldapsearch failed ($RC)!"
147 test $KILLSERVERS != no && kill -HUP $KILLPIDS
148 exit $RC
151 case ${RDBMS} in
152 # list here the RDBMSes whose mapping allows writes
153 pgsql|ibmdb2)
154 MANAGERDN="cn=Manager,${BASEDN}"
155 echo "Testing add..."
156 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
157 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
158 version: 1
160 # Adding an organization...
161 dn: o=An Org,${BASEDN}
162 changetype: add
163 objectClass: organization
164 o: An Org
166 # Adding an organization with an "auxiliary" objectClass..
167 dn: dc=subnet,${BASEDN}
168 changetype: add
169 objectClass: organization
170 objectClass: dcObject
171 o: SubNet
172 dc: subnet
174 # Adding another organization with an "auxiliary" objectClass..
175 dn: dc=subnet2,${BASEDN}
176 changetype: add
177 objectClass: organization
178 objectClass: dcObject
179 o: SubNet 2
180 dc: subnet2
182 # Adding a person...
183 dn: cn=Lev Tolstoij,${BASEDN}
184 changetype: add
185 objectClass: inetOrgPerson
186 cn: Lev Tolstoij
187 sn: Tolstoij
188 givenName: Lev
189 telephoneNumber: +39 02 XXXX YYYY
190 telephoneNumber: +39 02 XXXX ZZZZ
191 userPassword: tanja
193 # Adding a person with an "auxiliary" objectClass...
194 dn: cn=Some One,${BASEDN}
195 changetype: add
196 objectClass: inetOrgPerson
197 objectClass: simpleSecurityObject
198 cn: Some One
199 sn: One
200 givenName: Some
201 telephoneNumber: +1 800 900 1234
202 telephoneNumber: +1 800 900 1235
203 userPassword: someone
205 # Adding a person in another subtree...
206 dn: cn=SubNet User,dc=subnet,${BASEDN}
207 changetype: add
208 objectClass: inetOrgPerson
209 cn: SubNet User
210 sn: User
211 givenName: SubNet
213 # Adding a document...
214 dn: documentTitle=War and Peace,${BASEDN}
215 changetype: add
216 objectClass: document
217 description: Historical novel
218 documentTitle: War and Peace
219 documentAuthor: cn=Lev Tolstoij,dc=example,dc=com
220 documentIdentifier: document 3
221 EOMODS
223 RC=$?
224 if test $RC != 0 ; then
225 echo "ldapmodify failed ($RC)!"
226 test $KILLSERVERS != no && kill -HUP $KILLPIDS
227 exit $RC
230 echo "Using ldapsearch to retrieve all the entries..."
231 echo "# Using ldapsearch to retrieve all the entries..." >> $SEARCHOUT
232 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
233 "objectClass=*" >> $SEARCHOUT 2>&1
235 RC=$?
236 if test $RC != 0 ; then
237 echo "ldapsearch failed ($RC)!"
238 test $KILLSERVERS != no && kill -HUP $KILLPIDS
239 exit $RC
242 echo "Testing modify..."
243 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
244 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
245 version: 1
247 # Deleting all telephone numbers...
248 dn: cn=Some One,${BASEDN}
249 changetype: modify
250 delete: telephoneNumber
253 # Adding a telephone number...
254 dn: cn=Mitya Kovalev,${BASEDN}
255 changetype: modify
256 add: telephoneNumber
257 telephoneNumber: +1 800 123 4567
260 # Deleting a specific telephone number and adding a new one...
261 dn: cn=Lev Tolstoij,${BASEDN}
262 changetype: modify
263 delete: telephoneNumber
264 telephoneNumber: +39 02 XXXX YYYY
266 add: telephoneNumber
267 telephoneNumber: +39 333 ZZZ 1234
270 # Adding an author to a document...
271 dn: documentTitle=book1,${BASEDN}
272 changetype: modify
273 add: documentAuthor
274 documentAuthor: cn=Lev Tolstoij,${BASEDN}
277 # Adding an author to another document...
278 dn: documentTitle=book2,${BASEDN}
279 changetype: modify
280 add: documentAuthor
281 documentAuthor: cn=Lev Tolstoij,${BASEDN}
284 # Adding an "auxiliary" objectClass...
285 dn: cn=Mitya Kovalev,${BASEDN}
286 changetype: modify
287 add: objectClass
288 objectClass: simpleSecurityObject
291 # Deleting an "auxiliary" objectClass...
292 dn: cn=Some One,${BASEDN}
293 changetype: modify
294 delete: objectClass
295 objectClass: simpleSecurityObject
298 # Deleting userPasswords
299 dn: cn=Lev Tolstoij,${BASEDN}
300 changetype: modify
301 delete: userPassword
303 EOMODS
305 RC=$?
306 if test $RC != 0 ; then
307 echo "ldapmodify failed ($RC)!"
308 test $KILLSERVERS != no && kill -HUP $KILLPIDS
309 exit $RC
312 echo "Using ldapsearch to retrieve all the entries..."
313 echo "# Using ldapsearch to retrieve all the entries..." >> $SEARCHOUT
314 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
315 "objectClass=*" >> $SEARCHOUT 2>&1
317 RC=$?
318 if test $RC != 0 ; then
319 echo "ldapsearch failed ($RC)!"
320 test $KILLSERVERS != no && kill -HUP $KILLPIDS
321 exit $RC
324 echo "Testing delete..."
325 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
326 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
327 version: 1
329 # Deleting a person...
330 dn: cn=Torvlobnor Puzdoy,${BASEDN}
331 changetype: delete
333 # Deleting a document...
334 dn: documentTitle=book1,${BASEDN}
335 changetype: delete
337 # Deleting an organization with an "auxiliary" objectClass...
338 dn: dc=subnet2,${BASEDN}
339 changetype: delete
340 EOMODS
342 RC=$?
343 if test $RC != 0 ; then
344 echo "ldapmodify failed ($RC)!"
345 test $KILLSERVERS != no && kill -HUP $KILLPIDS
346 exit $RC
349 echo "Using ldapsearch to retrieve all the entries..."
350 echo "# Using ldapsearch to retrieve all the entries..." >> $SEARCHOUT
351 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
352 "objectClass=*" >> $SEARCHOUT 2>&1
354 RC=$?
355 if test $RC != 0 ; then
356 echo "ldapsearch failed ($RC)!"
357 test $KILLSERVERS != no && kill -HUP $KILLPIDS
358 exit $RC
361 echo "Testing rename..."
362 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
363 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
364 version: 1
366 # Renaming an organization...
367 dn: o=An Org,${BASEDN}
368 changetype: modrdn
369 newrdn: o=Renamed Org
370 deleteoldrdn: 1
372 # Moving a person to another subtree...
373 dn: cn=Lev Tolstoij,${BASEDN}
374 changetype: modrdn
375 newrdn: cn=Lev Tolstoij
376 deleteoldrdn: 0
377 newsuperior: dc=subnet,${BASEDN}
379 # Renaming a book...
380 dn: documentTitle=book2,${BASEDN}
381 changetype: modrdn
382 newrdn: documentTitle=Renamed Book
383 deleteoldrdn: 1
384 EOMODS
386 RC=$?
387 if test $RC != 0 ; then
388 echo "ldapmodify failed ($RC)!"
389 test $KILLSERVERS != no && kill -HUP $KILLPIDS
390 exit $RC
393 echo "Using ldapsearch to retrieve all the entries..."
394 echo "# Using ldapsearch to retrieve all the entries..." >> $SEARCHOUT
395 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
396 "objectClass=*" >> $SEARCHOUT 2>&1
398 RC=$?
399 if test $RC != 0 ; then
400 echo "ldapsearch failed ($RC)!"
401 test $KILLSERVERS != no && kill -HUP $KILLPIDS
402 exit $RC
405 echo "Adding a child to a referral (should fail)..."
406 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
407 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
408 version: 1
410 dn: cn=Should Fail,ou=Referral,${BASEDN}
411 changetype: add
412 objectClass: inetOrgPerson
413 cn: Should Fail
414 sn: Fail
415 telephoneNumber: +39 02 23456789
416 EOMODS
418 RC=$?
419 if test $RC = 0 ; then
420 echo "ldapmodify should have failed ($RC)!"
421 test $KILLSERVERS != no && kill -HUP $KILLPIDS
422 exit 1
425 echo "Modifying a referral (should fail)..."
426 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
427 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
428 version: 1
430 dn: ou=Referral,${BASEDN}
431 changetype: modify
432 replace: ref
433 ref: ldap://localhost:9009/
435 EOMODS
437 RC=$?
438 if test $RC = 0 ; then
439 echo "ldapmodify should have failed ($RC)!"
440 test $KILLSERVERS != no && kill -HUP $KILLPIDS
441 exit 1
444 echo "Renaming a referral (should fail)..."
445 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
446 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
447 version: 1
449 dn: ou=Referral,${BASEDN}
450 changetype: modrdn
451 newrdn: ou=Renamed Referral
452 deleteoldrdn: 1
453 EOMODS
455 RC=$?
456 if test $RC = 0 ; then
457 echo "ldapmodify should have failed ($RC)!"
458 test $KILLSERVERS != no && kill -HUP $KILLPIDS
459 exit 1
462 echo "Deleting a referral (should fail)..."
463 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
464 -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
465 version: 1
467 dn: ou=Referral,${BASEDN}
468 changetype: delete
469 EOMODS
471 RC=$?
472 if test $RC = 0 ; then
473 echo "ldapmodify should have failed ($RC)!"
474 test $KILLSERVERS != no && kill -HUP $KILLPIDS
475 exit 1
478 echo "Adding a referral..."
479 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
480 -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS
481 version: 1
483 dn: ou=Another Referral,${BASEDN}
484 changetype: add
485 objectClass: referral
486 objectClass: extensibleObject
487 ou: Another Referral
488 ref: ldap://localhost:9009/
489 EOMODS
491 RC=$?
492 if test $RC != 0 ; then
493 echo "ldapmodify failed ($RC)!"
494 test $KILLSERVERS != no && kill -HUP $KILLPIDS
495 exit $RC
498 echo "Modifying a referral with manageDSAit..."
499 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
500 -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS
501 version: 1
503 dn: ou=Referral,${BASEDN}
504 changetype: modify
505 replace: ref
506 ref: ldap://localhost:9009/
508 EOMODS
510 RC=$?
511 if test $RC != 0 ; then
512 echo "ldapmodify failed ($RC)!"
513 test $KILLSERVERS != no && kill -HUP $KILLPIDS
514 exit $RC
517 echo "Using ldapsearch to retrieve the modified entry..."
518 echo "# Using ldapsearch to retrieve the modified entry..." >> $SEARCHOUT
519 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "ou=Referral,$BASEDN" -M \
520 "objectClass=*" '*' ref >> $SEARCHOUT 2>&1
522 RC=$?
523 if test $RC != 0 ; then
524 echo "ldapsearch failed ($RC)!"
525 test $KILLSERVERS != no && kill -HUP $KILLPIDS
526 exit $RC
529 echo "Renaming a referral with manageDSAit..."
530 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
531 -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS
532 version: 1
534 dn: ou=Referral,${BASEDN}
535 changetype: modrdn
536 newrdn: ou=Renamed Referral
537 deleteoldrdn: 1
538 EOMODS
540 RC=$?
541 if test $RC != 0 ; then
542 echo "ldapmodify failed ($RC)!"
543 test $KILLSERVERS != no && kill -HUP $KILLPIDS
544 exit $RC
547 echo "Using ldapsearch to retrieve the renamed entry..."
548 echo "# Using ldapsearch to retrieve the renamed entry..." >> $SEARCHOUT
549 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "ou=Renamed Referral,$BASEDN" -M \
550 "objectClass=*" '*' ref >> $SEARCHOUT 2>&1
552 RC=$?
553 if test $RC != 0 ; then
554 echo "ldapsearch failed ($RC)!"
555 test $KILLSERVERS != no && kill -HUP $KILLPIDS
556 exit $RC
559 echo "Deleting a referral with manageDSAit..."
560 $LDAPMODIFY -v -c -D "$MANAGERDN" -w $PASSWD \
561 -h $LOCALHOST -p $PORT1 -M >> $TESTOUT 2>&1 << EOMODS
562 version: 1
564 dn: ou=Renamed Referral,${BASEDN}
565 changetype: delete
566 EOMODS
568 RC=$?
569 if test $RC != 0 ; then
570 echo "ldapmodify failed ($RC)!"
571 test $KILLSERVERS != no && kill -HUP $KILLPIDS
572 exit $RC
575 BINDDN="cn=Mitya Kovalev,${BASEDN}"
576 BINDPW="mit"
577 NEWPW="newsecret"
578 echo "Testing passwd change..."
579 $LDAPPASSWD -h $LOCALHOST -p $PORT1 \
580 -D "${BINDDN}" -w ${BINDPW} -s ${NEWPW} \
581 "$BINDDN" >> $TESTOUT 2>&1
583 RC=$?
584 if test $RC != 0 ; then
585 echo "ldappasswd failed ($RC)!"
586 test $KILLSERVERS != no && kill -HUP $KILLPIDS
587 exit $RC
590 echo -n "Testing bind with new secret... "
591 $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $NEWPW
592 RC=$?
593 if test $RC != 0 ; then
594 echo "ldapwhoami failed ($RC)!"
595 test $KILLSERVERS != no && kill -HUP $KILLPIDS
596 exit $RC
599 BINDDN="cn=Some One,${BASEDN}"
600 BINDPW="someone"
601 echo -n "Testing bind with newly added user... "
602 $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $BINDPW
603 RC=$?
604 if test $RC != 0 ; then
605 echo "ldapwhoami failed ($RC)!"
606 test $KILLSERVERS != no && kill -HUP $KILLPIDS
607 exit $RC
610 echo "Using ldapsearch to retrieve all the entries..."
611 echo "# Using ldapsearch to retrieve all the entries..." >> $SEARCHOUT
612 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
613 "objectClass=*" >> $SEARCHOUT 2>&1
615 RC=$?
616 if test $RC != 0 ; then
617 echo "ldapsearch failed ($RC)!"
618 test $KILLSERVERS != no && kill -HUP $KILLPIDS
619 exit $RC
622 echo "Filtering ldapsearch results..."
623 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
624 echo "Filtering modified ldif..."
625 . $LDIFFILTER < $SQLWRITE > $LDIFFLT
626 echo "Comparing filter output..."
627 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
629 if test $? != 0 ; then
630 echo "comparison failed - SQL mods search didn't succeed"
631 test $KILLSERVERS != no && kill -HUP $KILLPIDS
632 exit 1
635 echo "Waiting 25 seconds for master to send changes..."
636 sleep 25
638 cat /dev/null > $SEARCHOUT
640 echo "Using ldapsearch to retrieve all the entries from the master..."
641 echo "# Using ldapsearch to retrieve all the entries from the master..." \
642 >> $SEARCHOUT
643 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
644 -D "$MANAGERDN" -w $PASSWD \
645 "(!(objectClass=referral))" >> $SEARCHOUT 2>&1
647 RC=$?
648 if test $RC != 0 ; then
649 echo "ldapsearch failed ($RC)!"
650 test $KILLSERVERS != no && kill -HUP $KILLPIDS
651 exit $RC
654 cat /dev/null > $SEARCHOUT2
656 echo "Using ldapsearch to retrieve all the entries from the slave..."
657 echo "# Using ldapsearch to retrieve all the entries from the slave..." \
658 >> $SEARCHOUT2
659 $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT2 -b "$BASEDN" \
660 -D "$UPDATEDN" -w $PASSWD \
661 "(objectClass=*)" >> $SEARCHOUT2 2>&1
663 RC=$?
664 if test $RC != 0 ; then
665 echo "ldapsearch failed ($RC)!"
666 test $KILLSERVERS != no && kill -HUP $KILLPIDS
667 exit $RC
670 echo "Filtering ldapsearch results from master..."
671 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
672 echo "Filtering ldapsearch results from slave..."
673 . $LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2
674 echo "Comparing filter output..."
675 $CMP $SEARCHFLT $SEARCHFLT2 > $CMPOUT
677 if test $? != 0 ; then
678 echo "Comparison failed"
679 test $KILLSERVERS != no && kill -HUP $KILLPIDS
680 exit 1
685 echo "apparently ${RDBMS} does not support writes; skipping..."
687 esac
689 test $KILLSERVERS != no && kill -HUP $KILLPIDS
691 echo ">>>>> Test succeeded"
692 exit 0