Author: tridge Date: 2004-11-15 00:15:25 +0000 (Mon, 15 Nov 2004) New Revision: 3742
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3742 Log: 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/ Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh =================================================================== --- branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh 2004-11-14 23:37:02 UTC (rev 3741) +++ branches/SAMBA_4_0/source/lib/ldb/tests/test-ldap.sh 2004-11-15 00:15:25 UTC (rev 3742) @@ -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