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