openldap/servers/slapd/back-meta/data/setup.sh
Pierangelo Masarati 74fa239a20 This is the commit of:
- librewrite, for string rewriting; it may be used in back-ldap
    by configuring with '--enable-rewrite'. It must be used in
    back-meta. There's a text file, 'libraries/librewrite/RATIONALE',
    that explains the usage and the features. More comprehensive
    documentation will follow.
  - enhancements of back-ldap (ITS#989,ITS#998,ITS#1002,ITS#1054 and ITS#1137)
    including dn rewriting, a fix to group acl matching and so
  - back-meta: a new backend that proxies a set of remote servers
    by spawning queries. It uses portions of back-ldap and the rewrite
    capabilities of librewrite. It can be compiled by configuring
    with `--enable-ldap --enable-rewrite --enable-meta'.
    There's a text file, 'servers/slapd/back-meta/Documentation', that
    describes the main features and config statements.

Note: someone (Kurt?) should run 'autoconf' and commit 'configure' as
my autoconf version must be different: my configures contain a number
of differences and I didn't feel comfortable in adding them :)
2001-05-12 00:51:28 +00:00

52 lines
1.3 KiB
Bash

#!/bin/sh
SRCDIR="../../../.."
METADBDIR="./meta-db"
SLAPADD="$SRCDIR/servers/slapd/tools/slapadd -v"
ADDCONF="./slapd-meta-plain.conf"
#ADDCONF="./slapd-meta-rewrite.conf"
#ADDCONF="./slapd-ldap-rewrite.conf"
LDAPADDCONF="./slapd-ldap-raw.conf"
CONF="./slapd.conf"
LDAPCONF="./slapd-ldap.conf"
PORT=9876
#DEBUG=-1
DEBUG=0
rm -rf $METADBDIR
rm -f schema ucdata
ln -s "$SRCDIR/servers/slapd/schema" .
ln -s "$SRCDIR/libraries/liblunicode" ucdata
for i in 1 2 3 ; do
echo "Feeding directory $i"
mkdir -p "$METADBDIR/$i"
$SLAPADD -f $ADDCONF -n $i -l meta-$i.ldif
done
sed "s/@PORT@/$PORT/" $ADDCONF > $CONF
sed "s/@PORT@/$PORT/" $LDAPADDCONF > $LDAPCONF
echo ""
echo "After slapd started, try"
echo ""
echo " ldapsearch -x -H ldap://localhost:$PORT -b '' -s base namingContexts"
echo ""
echo "and browse the directory using the last base that appears;"
echo "you may also try to bind as administrator of each subdirectory"
echo "or as \"cn=Ando, ...\" with password \"ando\": notice what happens"
echo "to attrs \"sn\" and \"cn\" of some entries based on the ACLs ..."
echo ""
echo "Starting slapd on port $PORT"
$SRCDIR/servers/slapd/slapd -f $CONF -h "ldap://localhost:$PORT/" -d $DEBUG
echo "Waiting 2 secs for everything to shut down ..."
sleep 2
#exit
rm -rf $METADBDIR
rm -f schema ucdata $CONF $LDAPCONF