-#!/bin/sh
-
+#! /bin/sh
+# $OpenLDAP$
if [ $# -eq 0 ]; then
SRCDIR="."
. $SRCDIR/scripts/defines.sh $SRCDIR $BDB2
# Sample NIS database in LDIF format
-NIS_LDIF=$SRCDIR/../servers/slapd/schema/nis_sample.ldif
+NIS_LDIF=$SRCDIR/data/nis_sample.ldif
# Sample configuration file for your LDAP server
if test "$BACKEND" = "bdb2" ; then
rm -f $DBDIR/[!C]*
-echo "Running ldif2ldbm to build slapd database..."
-$LDIF2LDBM -f $NIS_CONF -i $NIS_LDIF -e ../servers/slapd/tools
+echo "Running slapadd to build slapd database..."
+$SLAPADD -f $NIS_CONF -l $NIS_LDIF
RC=$?
if [ $RC != 0 ]; then
- echo "ldif2ldbm failed!"
+ echo "slapadd failed!"
exit $RC
fi