Home | History | Annotate | Line # | Download | only in scripts
test019-syncreplication-cascade revision 1.1
      1  1.1  lukem #! /bin/sh
      2  1.1  lukem # $OpenLDAP: pkg/ldap/tests/scripts/test019-syncreplication-cascade,v 1.19.2.3 2008/02/11 23:26:51 kurt Exp $
      3  1.1  lukem ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
      4  1.1  lukem ##
      5  1.1  lukem ## Copyright 1998-2008 The OpenLDAP Foundation.
      6  1.1  lukem ## All rights reserved.
      7  1.1  lukem ##
      8  1.1  lukem ## Redistribution and use in source and binary forms, with or without
      9  1.1  lukem ## modification, are permitted only as authorized by the OpenLDAP
     10  1.1  lukem ## Public License.
     11  1.1  lukem ##
     12  1.1  lukem ## A copy of this license is available in the file LICENSE in the
     13  1.1  lukem ## top-level directory of the distribution or, alternatively, at
     14  1.1  lukem ## <http://www.OpenLDAP.org/license.html>.
     15  1.1  lukem 
     16  1.1  lukem if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
     17  1.1  lukem 	echo "Test does not support $BACKEND"
     18  1.1  lukem 	exit 0
     19  1.1  lukem fi
     20  1.1  lukem 
     21  1.1  lukem echo "running defines.sh"
     22  1.1  lukem . $SRCDIR/scripts/defines.sh
     23  1.1  lukem 
     24  1.1  lukem if test $SYNCPROV = syncprovno; then 
     25  1.1  lukem 	echo "Syncrepl provider overlay not available, test skipped"
     26  1.1  lukem 	exit 0
     27  1.1  lukem fi 
     28  1.1  lukem 
     29  1.1  lukem mkdir -p $TESTDIR $DBDIR1 $DBDIR2 $DBDIR3 $DBDIR4 $DBDIR5 $DBDIR6
     30  1.1  lukem 
     31  1.1  lukem #
     32  1.1  lukem # Test replication:
     33  1.1  lukem # - start master
     34  1.1  lukem # - start slave
     35  1.1  lukem # - populate over ldap
     36  1.1  lukem # - perform some modifies and deleted
     37  1.1  lukem # - retrieve database over ldap and compare against expected results
     38  1.1  lukem #
     39  1.1  lukem 
     40  1.1  lukem echo "Starting master slapd on TCP/IP port $PORT1..."
     41  1.1  lukem . $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
     42  1.1  lukem $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
     43  1.1  lukem PID=$!
     44  1.1  lukem if test $WAIT != 0 ; then
     45  1.1  lukem     echo PID $PID
     46  1.1  lukem     read foo
     47  1.1  lukem fi
     48  1.1  lukem KILLPIDS="$PID"
     49  1.1  lukem 
     50  1.1  lukem sleep 1
     51  1.1  lukem 
     52  1.1  lukem echo "Using ldapsearch to check that master slapd (pid=$PID) is running..."
     53  1.1  lukem for i in 0 1 2 3 4 5; do
     54  1.1  lukem 	$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
     55  1.1  lukem 		'objectclass=*' > /dev/null 2>&1
     56  1.1  lukem 	RC=$?
     57  1.1  lukem 	if test $RC = 0 ; then
     58  1.1  lukem 		break
     59  1.1  lukem 	fi
     60  1.1  lukem 	echo "Waiting 5 seconds for slapd to start..."
     61  1.1  lukem 	sleep 5
     62  1.1  lukem done
     63  1.1  lukem 
     64  1.1  lukem if test $RC != 0 ; then
     65  1.1  lukem 	echo "ldapsearch failed ($RC)!"
     66  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
     67  1.1  lukem 	exit $RC
     68  1.1  lukem fi
     69  1.1  lukem 
     70  1.1  lukem echo "Using ldapadd to create the context prefix entry in the master..."
     71  1.1  lukem $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
     72  1.1  lukem 	$LDIFORDEREDCP > /dev/null 2>&1
     73  1.1  lukem RC=$?
     74  1.1  lukem if test $RC != 0 ; then
     75  1.1  lukem 	echo "ldapadd failed ($RC)!"
     76  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
     77  1.1  lukem 	exit $RC
     78  1.1  lukem fi
     79  1.1  lukem 
     80  1.1  lukem echo "Starting R1 slave slapd on TCP/IP port $PORT2..."
     81  1.1  lukem . $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $CONF2
     82  1.1  lukem $SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
     83  1.1  lukem SLAVEPID=$!
     84  1.1  lukem if test $WAIT != 0 ; then
     85  1.1  lukem     echo SLAVE R1 PID $SLAVEPID
     86  1.1  lukem     read foo
     87  1.1  lukem fi
     88  1.1  lukem KILLPIDS="$KILLPIDS $SLAVEPID"
     89  1.1  lukem 
     90  1.1  lukem sleep 1
     91  1.1  lukem 
     92  1.1  lukem echo "Using ldapsearch to check that R1 slave slapd (pid=$SLAVEPID) is running..."
     93  1.1  lukem for i in 0 1 2 3 4 5; do
     94  1.1  lukem 	$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
     95  1.1  lukem 		'objectclass=*' > /dev/null 2>&1
     96  1.1  lukem 	RC=$?
     97  1.1  lukem 	if test $RC = 0 ; then
     98  1.1  lukem 		break
     99  1.1  lukem 	fi
    100  1.1  lukem 	echo "Waiting 5 seconds for R1 slapd to start..."
    101  1.1  lukem 	sleep 5
    102  1.1  lukem done
    103  1.1  lukem 
    104  1.1  lukem if test $RC != 0 ; then
    105  1.1  lukem 	echo "ldapsearch failed ($RC)!"
    106  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    107  1.1  lukem 	exit $RC
    108  1.1  lukem fi
    109  1.1  lukem 
    110  1.1  lukem echo "Starting R2 slave slapd on TCP/IP port $PORT3..."
    111  1.1  lukem . $CONFFILTER $BACKEND $MONITORDB < $R2SRSLAVECONF > $CONF3
    112  1.1  lukem $SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING > $LOG3 2>&1 &
    113  1.1  lukem SLAVEPID=$!
    114  1.1  lukem if test $WAIT != 0 ; then
    115  1.1  lukem     echo SLAVE R2 PID $SLAVEPID
    116  1.1  lukem     read foo
    117  1.1  lukem fi
    118  1.1  lukem KILLPIDS="$KILLPIDS $SLAVEPID"
    119  1.1  lukem 
    120  1.1  lukem sleep 1
    121  1.1  lukem 
    122  1.1  lukem echo "Using ldapsearch to check that R2 slave slapd (pid=$SLAVEPID) is running..."
    123  1.1  lukem for i in 0 1 2 3 4 5; do
    124  1.1  lukem 	$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT3 \
    125  1.1  lukem 		'objectclass=*' > /dev/null 2>&1
    126  1.1  lukem 	RC=$?
    127  1.1  lukem 	if test $RC = 0 ; then
    128  1.1  lukem 		break
    129  1.1  lukem 	fi
    130  1.1  lukem 	echo "Waiting 5 seconds for R2 slave slapd to start..."
    131  1.1  lukem 	sleep 5
    132  1.1  lukem done
    133  1.1  lukem 
    134  1.1  lukem if test $RC != 0 ; then
    135  1.1  lukem 	echo "ldapsearch failed ($RC)!"
    136  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    137  1.1  lukem 	exit $RC
    138  1.1  lukem fi
    139  1.1  lukem 
    140  1.1  lukem echo "Starting P1 slave slapd on TCP/IP port $PORT4..."
    141  1.1  lukem . $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $CONF4
    142  1.1  lukem $SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING > $LOG4 2>&1 &
    143  1.1  lukem SLAVEPID=$!
    144  1.1  lukem if test $WAIT != 0 ; then
    145  1.1  lukem     echo SLAVE P1 PID $SLAVEPID
    146  1.1  lukem     read foo
    147  1.1  lukem fi
    148  1.1  lukem KILLPIDS="$KILLPIDS $SLAVEPID"
    149  1.1  lukem 
    150  1.1  lukem sleep 1
    151  1.1  lukem 
    152  1.1  lukem echo "Using ldapsearch to check that P1 slave slapd (pid=$SLAVEPID) is running..."
    153  1.1  lukem for i in 0 1 2 3 4 5; do
    154  1.1  lukem 	$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT4 \
    155  1.1  lukem 		'objectclass=*' > /dev/null 2>&1
    156  1.1  lukem 	RC=$?
    157  1.1  lukem 	if test $RC = 0 ; then
    158  1.1  lukem 		break
    159  1.1  lukem 	fi
    160  1.1  lukem 	echo "Waiting 5 seconds for P1 slave slapd to start..."
    161  1.1  lukem 	sleep 5
    162  1.1  lukem done
    163  1.1  lukem 
    164  1.1  lukem if test $RC != 0 ; then
    165  1.1  lukem 	echo "ldapsearch failed ($RC)!"
    166  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    167  1.1  lukem 	exit $RC
    168  1.1  lukem fi
    169  1.1  lukem 
    170  1.1  lukem echo "Starting P2 slave slapd on TCP/IP port $PORT5..."
    171  1.1  lukem . $CONFFILTER $BACKEND $MONITORDB < $P2SRSLAVECONF > $CONF5
    172  1.1  lukem $SLAPD -f $CONF5 -h $URI5 -d $LVL $TIMING > $LOG5 2>&1 &
    173  1.1  lukem SLAVEPID=$!
    174  1.1  lukem if test $WAIT != 0 ; then
    175  1.1  lukem     echo SLAVE P2 PID $SLAVEPID
    176  1.1  lukem     read foo
    177  1.1  lukem fi
    178  1.1  lukem KILLPIDS="$KILLPIDS $SLAVEPID"
    179  1.1  lukem 
    180  1.1  lukem sleep 1
    181  1.1  lukem 
    182  1.1  lukem echo "Using ldapsearch to check that P2 slave slapd (pid=$SLAVEPID) is running..."
    183  1.1  lukem for i in 0 1 2 3 4 5; do
    184  1.1  lukem 	$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT5 \
    185  1.1  lukem 		'objectclass=*' > /dev/null 2>&1
    186  1.1  lukem 	RC=$?
    187  1.1  lukem 	if test $RC = 0 ; then
    188  1.1  lukem 		break
    189  1.1  lukem 	fi
    190  1.1  lukem 	echo "Waiting 5 seconds for P2 slave slapd to start..."
    191  1.1  lukem 	sleep 5
    192  1.1  lukem done
    193  1.1  lukem 
    194  1.1  lukem if test $RC != 0 ; then
    195  1.1  lukem 	echo "ldapsearch failed ($RC)!"
    196  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    197  1.1  lukem 	exit $RC
    198  1.1  lukem fi
    199  1.1  lukem 
    200  1.1  lukem echo "Starting P3 slave slapd on TCP/IP port $PORT6..."
    201  1.1  lukem . $CONFFILTER $BACKEND $MONITORDB < $P3SRSLAVECONF > $CONF6
    202  1.1  lukem $SLAPD -f $CONF6 -h $URI6 -d $LVL $TIMING > $LOG6 2>&1 &
    203  1.1  lukem SLAVEPID=$!
    204  1.1  lukem if test $WAIT != 0 ; then
    205  1.1  lukem     echo SLAVE P3 PID $SLAVEPID
    206  1.1  lukem     read foo
    207  1.1  lukem fi
    208  1.1  lukem KILLPIDS="$KILLPIDS $SLAVEPID"
    209  1.1  lukem 
    210  1.1  lukem sleep 1
    211  1.1  lukem 
    212  1.1  lukem echo "Using ldapsearch to check that P3 slave slapd (pid=$SLAVEPID) is running..."
    213  1.1  lukem for i in 0 1 2 3 4 5; do
    214  1.1  lukem 	$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT6 \
    215  1.1  lukem 		'objectclass=*' > /dev/null 2>&1
    216  1.1  lukem 	RC=$?
    217  1.1  lukem 	if test $RC = 0 ; then
    218  1.1  lukem 		break
    219  1.1  lukem 	fi
    220  1.1  lukem 	echo "Waiting 5 seconds for P3 slave slapd to start..."
    221  1.1  lukem 	sleep 5
    222  1.1  lukem done
    223  1.1  lukem 
    224  1.1  lukem if test $RC != 0 ; then
    225  1.1  lukem 	echo "ldapsearch failed ($RC)!"
    226  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    227  1.1  lukem 	exit $RC
    228  1.1  lukem fi
    229  1.1  lukem 
    230  1.1  lukem echo "Using ldapadd to populate the master directory..."
    231  1.1  lukem $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
    232  1.1  lukem 	$LDIFORDEREDNOCP > /dev/null 2>&1
    233  1.1  lukem RC=$?
    234  1.1  lukem if test $RC != 0 ; then
    235  1.1  lukem 	echo "ldapadd failed ($RC)!"
    236  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    237  1.1  lukem 	exit $RC
    238  1.1  lukem fi
    239  1.1  lukem 
    240  1.1  lukem echo "Waiting 25 seconds for syncrepl to receive changes..."
    241  1.1  lukem sleep 25
    242  1.1  lukem 
    243  1.1  lukem echo "Using ldapmodify to modify master directory..."
    244  1.1  lukem 
    245  1.1  lukem #
    246  1.1  lukem # Do some modifications
    247  1.1  lukem #
    248  1.1  lukem 
    249  1.1  lukem $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
    250  1.1  lukem 	$TESTOUT 2>&1 << EOMODS
    251  1.1  lukem dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example,dc=com
    252  1.1  lukem changetype: modify
    253  1.1  lukem add: drink
    254  1.1  lukem drink: Orange Juice
    255  1.1  lukem -
    256  1.1  lukem delete: sn
    257  1.1  lukem sn: Jones
    258  1.1  lukem -
    259  1.1  lukem add: sn
    260  1.1  lukem sn: Jones
    261  1.1  lukem 
    262  1.1  lukem dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
    263  1.1  lukem changetype: modify
    264  1.1  lukem replace: drink
    265  1.1  lukem drink: Iced Tea
    266  1.1  lukem drink: Mad Dog 20/20
    267  1.1  lukem 
    268  1.1  lukem dn: cn=ITD Staff,ou=Groups,dc=example,dc=com
    269  1.1  lukem changetype: modify
    270  1.1  lukem delete: uniquemember
    271  1.1  lukem uniquemember: cn=James A Jones 2, ou=Information Technology Division, ou=People, dc=example,dc=com
    272  1.1  lukem uniquemember: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
    273  1.1  lukem -
    274  1.1  lukem add: uniquemember
    275  1.1  lukem uniquemember: cn=Dorothy Stevens, ou=Alumni Association, ou=People, dc=example,dc=com
    276  1.1  lukem uniquemember: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example,dc=com
    277  1.1  lukem 
    278  1.1  lukem dn: cn=All Staff,ou=Groups,dc=example,dc=com
    279  1.1  lukem changetype: modify
    280  1.1  lukem delete: description
    281  1.1  lukem 
    282  1.1  lukem dn: cn=Gern Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
    283  1.1  lukem changetype: add
    284  1.1  lukem objectclass: OpenLDAPperson
    285  1.1  lukem cn: Gern Jensen
    286  1.1  lukem sn: Jensen
    287  1.1  lukem uid: gjensen
    288  1.1  lukem title: Chief Investigator, ITD
    289  1.1  lukem postaladdress: ITD $ 535 W. William St $ Ann Arbor, MI 48103
    290  1.1  lukem seealso: cn=All Staff, ou=Groups, dc=example,dc=com
    291  1.1  lukem drink: Coffee
    292  1.1  lukem homepostaladdress: 844 Brown St. Apt. 4 $ Ann Arbor, MI 48104
    293  1.1  lukem description: Very odd
    294  1.1  lukem facsimiletelephonenumber: +1 313 555 7557
    295  1.1  lukem telephonenumber: +1 313 555 8343
    296  1.1  lukem mail: gjensen@mailgw.example.com
    297  1.1  lukem homephone: +1 313 555 8844
    298  1.1  lukem 
    299  1.1  lukem dn: ou=Retired, ou=People, dc=example,dc=com
    300  1.1  lukem changetype: add
    301  1.1  lukem objectclass: organizationalUnit
    302  1.1  lukem ou: Retired
    303  1.1  lukem 
    304  1.1  lukem dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, dc=example,dc=com
    305  1.1  lukem changetype: add
    306  1.1  lukem objectclass: OpenLDAPperson
    307  1.1  lukem cn: Rosco P. Coltrane
    308  1.1  lukem sn: Coltrane
    309  1.1  lukem uid: rosco
    310  1.1  lukem 
    311  1.1  lukem dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, dc=example,dc=com
    312  1.1  lukem changetype: modrdn
    313  1.1  lukem newrdn: cn=Rosco P. Coltrane
    314  1.1  lukem deleteoldrdn: 1
    315  1.1  lukem newsuperior: ou=Retired, ou=People, dc=example,dc=com
    316  1.1  lukem 
    317  1.1  lukem dn: cn=James A Jones 2, ou=Information Technology Division, ou=People, dc=example,dc=com
    318  1.1  lukem changetype: delete
    319  1.1  lukem 
    320  1.1  lukem EOMODS
    321  1.1  lukem 
    322  1.1  lukem RC=$?
    323  1.1  lukem if test $RC != 0 ; then
    324  1.1  lukem 	echo "ldapmodify failed ($RC)!"
    325  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    326  1.1  lukem 	exit $RC
    327  1.1  lukem fi
    328  1.1  lukem 
    329  1.1  lukem echo "Waiting 25 seconds for syncrepl to receive changes..."
    330  1.1  lukem sleep 25
    331  1.1  lukem 
    332  1.1  lukem echo "Using ldapsearch to read all the entries from the master..."
    333  1.1  lukem $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
    334  1.1  lukem 	'objectclass=*' > $MASTEROUT 2>&1
    335  1.1  lukem RC=$?
    336  1.1  lukem 
    337  1.1  lukem if test $RC != 0 ; then
    338  1.1  lukem 	echo "ldapsearch failed at master ($RC)!"
    339  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    340  1.1  lukem 	exit $RC
    341  1.1  lukem fi
    342  1.1  lukem 
    343  1.1  lukem echo "Using ldapsearch to read all the entries from the R1 slave..."
    344  1.1  lukem $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
    345  1.1  lukem 	'objectclass=*' > $SERVER2OUT 2>&1
    346  1.1  lukem RC=$?
    347  1.1  lukem 
    348  1.1  lukem if test $RC != 0 ; then
    349  1.1  lukem 	echo "ldapsearch failed at R1 slave ($RC)!"
    350  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    351  1.1  lukem 	exit $RC
    352  1.1  lukem fi
    353  1.1  lukem 
    354  1.1  lukem echo "Using ldapsearch to read all the entries from the R2 slave..."
    355  1.1  lukem $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
    356  1.1  lukem 	'objectclass=*' > $SERVER3OUT 2>&1
    357  1.1  lukem RC=$?
    358  1.1  lukem 
    359  1.1  lukem if test $RC != 0 ; then
    360  1.1  lukem 	echo "ldapsearch failed at R2 slave ($RC)!"
    361  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    362  1.1  lukem 	exit $RC
    363  1.1  lukem fi
    364  1.1  lukem 
    365  1.1  lukem echo "Using ldapsearch to read all the entries from the P1 slave..."
    366  1.1  lukem $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
    367  1.1  lukem 	'objectclass=*' > $SERVER4OUT 2>&1
    368  1.1  lukem RC=$?
    369  1.1  lukem 
    370  1.1  lukem if test $RC != 0 ; then
    371  1.1  lukem 	echo "ldapsearch failed at P1 slave ($RC)!"
    372  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    373  1.1  lukem 	exit $RC
    374  1.1  lukem fi
    375  1.1  lukem 
    376  1.1  lukem echo "Using ldapsearch to read all the entries from the P2 slave..."
    377  1.1  lukem $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT5 \
    378  1.1  lukem 	'objectclass=*' > $SERVER5OUT 2>&1
    379  1.1  lukem RC=$?
    380  1.1  lukem 
    381  1.1  lukem if test $RC != 0 ; then
    382  1.1  lukem 	echo "ldapsearch failed at P2 slave ($RC)!"
    383  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    384  1.1  lukem 	exit $RC
    385  1.1  lukem fi
    386  1.1  lukem 
    387  1.1  lukem echo "Using ldapsearch to read all the entries from the P3 slave..."
    388  1.1  lukem $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT6 \
    389  1.1  lukem 	'objectclass=*' > $SERVER6OUT 2>&1
    390  1.1  lukem RC=$?
    391  1.1  lukem 
    392  1.1  lukem if test $RC != 0 ; then
    393  1.1  lukem 	echo "ldapsearch failed at P3 slave ($RC)!"
    394  1.1  lukem 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
    395  1.1  lukem 	exit $RC
    396  1.1  lukem fi
    397  1.1  lukem 
    398  1.1  lukem test $KILLSERVERS != no && kill -HUP $KILLPIDS
    399  1.1  lukem 
    400  1.1  lukem echo "Filtering master ldapsearch results..."
    401  1.1  lukem . $LDIFFILTER < $MASTEROUT > $MASTERFLT
    402  1.1  lukem echo "Filtering R1 slave ldapsearch results..."
    403  1.1  lukem . $LDIFFILTER < $SERVER2OUT > $SERVER2FLT
    404  1.1  lukem echo "Filtering R2 slave ldapsearch results..."
    405  1.1  lukem . $LDIFFILTER < $SERVER3OUT > $SERVER3FLT
    406  1.1  lukem echo "Filtering P1 slave ldapsearch results..."
    407  1.1  lukem . $LDIFFILTER < $SERVER4OUT > $SERVER4FLT
    408  1.1  lukem echo "Filtering P2 slave ldapsearch results..."
    409  1.1  lukem . $LDIFFILTER < $SERVER5OUT > $SERVER5FLT
    410  1.1  lukem echo "Filtering P3 slave ldapsearch results..."
    411  1.1  lukem . $LDIFFILTER < $SERVER6OUT > $SERVER6FLT
    412  1.1  lukem 
    413  1.1  lukem echo "Comparing retrieved entries from master and R1 slave..."
    414  1.1  lukem $CMP $MASTERFLT $SERVER2FLT > $CMPOUT
    415  1.1  lukem 
    416  1.1  lukem if test $? != 0 ; then
    417  1.1  lukem 	echo "test failed - master and R1 slave databases differ"
    418  1.1  lukem 	exit 1
    419  1.1  lukem fi
    420  1.1  lukem 
    421  1.1  lukem echo "Comparing retrieved entries from master and R2 slave..."
    422  1.1  lukem $CMP $MASTERFLT $SERVER3FLT > $CMPOUT
    423  1.1  lukem 
    424  1.1  lukem if test $? != 0 ; then
    425  1.1  lukem 	echo "test failed - master and R2 slave databases differ"
    426  1.1  lukem 	exit 1
    427  1.1  lukem fi
    428  1.1  lukem 
    429  1.1  lukem echo "Comparing retrieved entries from master and P1 slave..."
    430  1.1  lukem $CMP $MASTERFLT $SERVER4FLT > $CMPOUT
    431  1.1  lukem 
    432  1.1  lukem if test $? != 0 ; then
    433  1.1  lukem 	echo "test failed - master and P1 slave databases differ"
    434  1.1  lukem 	exit 1
    435  1.1  lukem fi
    436  1.1  lukem 
    437  1.1  lukem echo "Comparing retrieved entries from master and P2 slave..."
    438  1.1  lukem $CMP $MASTERFLT $SERVER5FLT > $CMPOUT
    439  1.1  lukem 
    440  1.1  lukem if test $? != 0 ; then
    441  1.1  lukem 	echo "test failed - master and P2 slave databases differ"
    442  1.1  lukem 	exit 1
    443  1.1  lukem fi
    444  1.1  lukem 
    445  1.1  lukem echo "Comparing retrieved entries from master and P3 slave..."
    446  1.1  lukem $CMP $MASTERFLT $SERVER6FLT > $CMPOUT
    447  1.1  lukem 
    448  1.1  lukem if test $? != 0 ; then
    449  1.1  lukem 	echo "test failed - master and P3 slave databases differ"
    450  1.1  lukem 	exit 1
    451  1.1  lukem fi
    452  1.1  lukem 
    453  1.1  lukem echo ">>>>> Test succeeded"
    454  1.1  lukem 
    455  1.1  lukem test $KILLSERVERS != no && wait
    456  1.1  lukem 
    457  1.1  lukem exit 0
    458