#relaymod#moduleload back_relay.la
#ldapmod#modulepath ../servers/slapd/back-ldap/
#ldapmod#moduleload back_ldap.la
+#metamod#modulepath ../servers/slapd/back-meta/
+#metamod#moduleload back_meta.la
#monitormod#modulepath ../servers/slapd/back-monitor/
#monitormod#moduleload back_monitor.la
#rwmmod#modulepath ../servers/slapd/overlays/
#ldap#uri "@URI1@"
#ldap#overlay rwm
#ldap#rwm-suffixmassage "dc=example,dc=com"
+#meta#uri "@URI1@o=Example,c=US"
+#meta#suffixmassage "o=Example,c=US" "dc=example,dc=com"
database @RELAY@
suffix "o=Esempio,c=IT"
-### back-ldap needs URI
-#ldap#uri "@URI1@"
### use this alternate form of back-relay, without the "relay" directive,
### which causes the target database to be selected after DN massaging
-overlay rwm
-rwm-suffixmassage "dc=example,dc=com"
+#relay#overlay rwm
+#relay#rwm-suffixmassage "dc=example,dc=com"
+### back-ldap needs URI
+#ldap#uri "@URI1@"
+#ldap#overlay rwm
+#ldap#rwm-suffixmassage "dc=example,dc=com"
+#meta#uri "@URI1@o=Esempio,c=IT"
+#meta#suffixmassage "o=Esempio,c=IT" "dc=example,dc=com"
database @RELAY@
suffix "o=Beispiel,c=DE"
#ldap#uri "@URI1@"
#ldap#overlay rwm
#ldap#rwm-suffixmassage "dc=example,dc=com"
+#meta#uri "@URI1@o=Beispiel,c=DE"
+#meta#suffixmassage "o=Beispiel,c=DE" "dc=example,dc=com"
#monitor#database monitor
AC_hdb=@BUILD_HDB@
AC_ldap=ldap@BUILD_LDAP@
AC_ldbm=@BUILD_LDBM@
+AC_meta=meta@BUILD_META@
AC_monitor=@BUILD_MONITOR@
AC_relay=relay@BUILD_RELAY@
AC_sql=sql@BUILD_SQL@
AC_WITH_TLS=@WITH_TLS@
AC_WITH_MODULES_ENABLED=@WITH_MODULES_ENABLED@
-export AC_bdb AC_hdb AC_ldap AC_ldbm AC_monitor AC_relay AC_sql
+export AC_bdb AC_hdb AC_ldap AC_ldbm AC_meta AC_monitor AC_relay AC_sql
export AC_glue AC_pcache AC_ppolicy AC_refint AC_unique AC_rwm AC_syncprov
export AC_WITH_SASL AC_WITH_TLS AC_WITH_MODULES_ENABLED
-e "s/^#${RELAY}#//" \
-e "s/^#${BACKENDTYPE}#//" \
-e "s/^#${AC_ldap}#//" \
+ -e "s/^#${AC_meta}#//" \
-e "s/^#${AC_relay}#//" \
-e "s/^#${AC_sql}#//" \
-e "s/^#${RDBMS}#//" \
MONITORDB=${AC_monitor-no}
BACKLDAP=${AC_ldap-ldapno}
+BACKMETA=${AC_meta-metano}
BACKRELAY=${AC_relay-relayno}
BACKSQL=${AC_sql-sqlno}
RDBMS=${SLAPD_USE_SQL-rdbmsno}
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
-if test $RWM = rwmno ; then
- echo "Rewrite/remap overlay not available, test skipped"
- exit 0
-fi
-
-mkdir -p $TESTDIR $DBDIR1
+echo "Testing virtual naming context mapping with $RELAY backend..."
+echo ""
echo "Starting slapd on TCP/IP port $PORT1..."
. $CONFFILTER $BACKEND $MONITORDB < $RWMCONF > $CONF1
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-echo ">>>>> Test succeeded"
-exit 0
-
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
+if test $RWM = rwmno ; then
+ echo "Rewrite/remap overlay not available, test skipped"
+ exit 0
+fi
+
+echo ""
+
+RELAYS=
+# back-relay
if test $BACKRELAY = relayno ; then
echo "relay backend not available, test skipped"
- exit 0
+else
+ RELAYS="$RELAYS relay"
+fi
+
+# back-ldap
+if test $BACKLDAP = ldapno ; then
+ echo "ldap backend not available, test skipped"
+else
+ RELAYS="$RELAYS ldap"
+fi
+
+# back-meta - disable by now, needs work to line up with rwm
+if test $BACKMETA = metano ; then
+ echo "meta backend not available, test skipped"
+else
+ # RELAYS="$RELAYS meta"
+ echo "==> back-meta disabled by now, needs work"
+ echo ""
fi
-RELAY=relay
-. $SRCDIR/scripts/relay
+first=1
+for RELAY in $RELAYS ; do
+ if test $first = 1 ; then
+ first=0
+ else
+ echo ">>>>> waiting 10 seconds for things to exit"
+ sleep 10
+ echo ""
+
+ rm -rf $TESTDIR
+ fi
+
+ mkdir -p $TESTDIR $DBDIR1
+
+ . $SRCDIR/scripts/relay
+done
+
+echo ">>>>> Test succeeded"
+exit 0