-for M in 1 2 ; do
- P=`expr 9010 + $M`
- echo "Using ldapadd to populate the common root on port $P..."
- $LDAPADD -D "cn=Manager $M,$BASEDN" -w $PASSWD -h $LOCALHOST -p $P \
- -f $LDIFORDERED \
- -c -e\!assert="(&(!(entryDN:dnSubtreeMatch:=${SUBTREE1}))(!(entryDN:dnSubtreeMatch:=${SUBTREE2})))" \
- > /dev/null 2>&1
- RC=$?
- case $RC in
- 0)
- echo "ldapadd should have failed ($RC)!"
- test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit -1
- ;;
- 10|32|68)
- # FIXME: we should rather get ASSERT, and ignore it;
- # see <http://www.openldap.org/lists/openldap-software/200512/msg00250.html>
- # for details.
- # Fine by now if we get noSuchObject, alreadyExists
- # or referrals
- ;;
- *)
- echo "ldapadd failed ($RC)!"
- test $KILLSERVERS != no && kill -HUP $KILLPIDS
- exit $RC
- ;;
- esac
-done
-