]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/startup_nis_ldap_server.sh
From HEAD
[openldap] / tests / scripts / startup_nis_ldap_server.sh
index 8faf3027bd20dfc93c6784910359866f4b3bbc79..72606e834a982b56910c3d4a9236986e8295be03 100755 (executable)
@@ -1,5 +1,17 @@
-#!/bin/sh
-
+#! /bin/sh
+# $OpenLDAP$
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
+##
+## Copyright 1998-2006 The OpenLDAP Foundation.
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted only as authorized by the OpenLDAP
+## Public License.
+##
+## A copy of this license is available in the file LICENSE in the
+## top-level directory of the distribution or, alternatively, at
+## <http://www.OpenLDAP.org/license.html>.
 
 if [ $# -eq 0 ]; then
        SRCDIR="."
@@ -13,7 +25,7 @@ fi
 . $SRCDIR/scripts/defines.sh $SRCDIR $BDB2
 
 # Sample NIS database in LDIF format
-NIS_LDIF=$SRCDIR/../schema/nis_sample.ldif
+NIS_LDIF=$SRCDIR/data/nis_sample.ldif
 
 # Sample configuration file for your LDAP server
 if test "$BACKEND" = "bdb2" ; then
@@ -26,11 +38,11 @@ echo "Cleaning up in $DBDIR..."
 
 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