# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-## Copyright 1998-2005 The OpenLDAP Foundation.
+## Copyright 1998-2007 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
kill -HUP $SLAVEPID
KILLPIDS="$PID $SLURPPID"
-echo "Waiting 5 seconds for slave slapd to die..."
-sleep 5
+echo "Waiting for slave slapd to die..."
+wait $SLAVEPID
echo "Applying more changes to the master slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
kill -HUP $SLURPPID
KILLPIDS="$PID"
-echo "Waiting 5 seconds for slurpd to die..."
-sleep 5
+echo "Waiting for slurpd to die..."
+wait $SLURPPID
echo "Applying more changes to the master slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
fi
echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
exit 0