summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/init_slapd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tests/init_slapd.sh')
-rwxr-xr-xsource4/lib/ldb/tests/init_slapd.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/lib/ldb/tests/init_slapd.sh b/source4/lib/ldb/tests/init_slapd.sh
index fc1ed16a4c..c50ea0ecab 100755
--- a/source4/lib/ldb/tests/init_slapd.sh
+++ b/source4/lib/ldb/tests/init_slapd.sh
@@ -1,5 +1,10 @@
#!/bin/sh
+if [ -z "$LDBDIR" ]; then
+ LDBDIR=`dirname $0`/..
+ export LDBDIR
+fi
+
rm -rf tests/tmp/db
mkdir -p tests/tmp/db
@@ -10,4 +15,4 @@ sleep 2
if pidof slapd > /dev/null; then
killall -9 slapd
fi
-slapadd -f tests/slapd.conf < tests/init.ldif || exit 1
+slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 1