diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-15 00:15:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:49 -0500 |
commit | f7cbd3450b0099cc2b79e786b9a4fe3fdd9594ff (patch) | |
tree | 90289ce8b4f588b1e42af2c8bb5caff117abf080 | |
parent | 24a40fb41280a9eb22be89699c76eeeb8aab7111 (diff) | |
download | samba-f7cbd3450b0099cc2b79e786b9a4fe3fdd9594ff.tar.gz samba-f7cbd3450b0099cc2b79e786b9a4fe3fdd9594ff.tar.bz2 samba-f7cbd3450b0099cc2b79e786b9a4fe3fdd9594ff.zip |
r3742: make test-ldap give a sane error message when the openldap schema files are missing
and auto-link the files if they are found in /etc/ldap/schema/
(This used to be commit 88b03ffc85d43ac83193a093cdb246794d74c4e4)
-rwxr-xr-x | source4/lib/ldb/tests/test-ldap.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/test-ldap.sh b/source4/lib/ldb/tests/test-ldap.sh index 29b40ff455..3e285a39a9 100755 --- a/source4/lib/ldb/tests/test-ldap.sh +++ b/source4/lib/ldb/tests/test-ldap.sh @@ -1,5 +1,24 @@ #!/bin/sh +SCHEMA_NEEDED="core nis cosine inetorgperson openldap" + +# setup needed schema files +for f in $SCHEMA_NEEDED; do + if [ ! -r tests/schema/$f.schema ]; then + mkdir -p tests/schema + if [ -r /etc/ldap/schema/$f.schema ]; then + ln -s /etc/ldap/schema/$f.schema tests/schema/$f.schema + continue; + fi + + echo "ERROR: you need the following OpenLDAP schema files in tests/schema/" + for f in $SCHEMA_NEEDED; do + echo " $f.schema" + done + exit 1 + fi +done + tests/init_slapd.sh tests/start_slapd.sh |