From ae174faf36dbe28b24069bafe5836b6271c87e12 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jan 2007 05:11:19 +0000 Subject: r21069: Try to split up the mktestsetup.sh script into parts to deal with each LDAP implementation, and another to hold the key blobs. Also fix the OpenLDAP test. Andrew Bartlett (This used to be commit ec511c592bbb7df513fe6f62e06e1fa984431550) --- source4/script/tests/mk-openldap.sh | 122 ++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 source4/script/tests/mk-openldap.sh (limited to 'source4/script/tests/mk-openldap.sh') diff --git a/source4/script/tests/mk-openldap.sh b/source4/script/tests/mk-openldap.sh new file mode 100644 index 0000000000..0759532d3f --- /dev/null +++ b/source4/script/tests/mk-openldap.sh @@ -0,0 +1,122 @@ +SLAPD_CONF=$LDAPDIR/slapd.conf +export SLAPD_CONF + +cat >$SLAPD_CONF < $LDAPDIR/db/DB_CONFIG <&2 + +#Now create an LDAP baseDN +$srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-base >&2 + +OLDPATH=$PATH +PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH +export PATH + +MODCONF=$LDAPDIR/modules.conf +rm -f $MODCONF +touch $MODCONF + +slaptest -u -f $SLAPD_CONF >&2 || { + echo "enabling slapd modules" >&2 + cat > $MODCONF </dev/null || { + echo "slapadd failed" >&2 + } + + slaptest -f $SLAPD_CONF >/dev/null || { + echo "slaptest after database load failed" >&2 + } +fi + +PATH=$OLDPATH +export PATH + -- cgit