$SLAPPASSWD -g -n >$CONFIGPWF
echo "rootpw `$SLAPPASSWD -T $CONFIGPWF`" >$TESTDIR/configpw.conf
+if test $MONITORDB != no ; then
+ DBIX=2
+else
+ DBIX=1
+fi
+
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $MCONF > $ADDCONF
$SLAPADD -f $ADDCONF -l $LDIFORDERED
$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \
$TESTOUT 2>&1 << EOMODS
version: 1
-dn: olcOverlay={0}dynlist,olcDatabase={2}$BACKEND,cn=config
+dn: olcOverlay={0}dynlist,olcDatabase={$DBIX}$BACKEND,cn=config
changetype: modify
delete: olcDLattrSet
olcDLattrSet: {0}
$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \
$TESTOUT 2>&1 << EOMODS
version: 1
-dn: olcOverlay={0}dynlist,olcDatabase={2}$BACKEND,cn=config
+dn: olcOverlay={0}dynlist,olcDatabase={$DBIX}$BACKEND,cn=config
changetype: modify
delete: olcDLattrSet
olcDLattrSet: {0}
$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \
$TESTOUT 2>&1 << EOMODS
version: 1
-dn: olcDatabase={2}$BACKEND,cn=config
+dn: olcDatabase={$DBIX}$BACKEND,cn=config
changetype: modify
add: olcAccess
olcAccess: to dn.base="cn=Dynamic List of Members,$LISTDN" by * read