-#!/bin/sh
+#! /bin/sh
egrep -iv '^modifiersname:|^modifytimestamp:|^creatorsname:|^createtimestamp'
-#!/bin/sh
+#! /bin/sh
# disable LDAP initialization
LDAPNOINIT=true; export LDAPNOINIT
echo ">>>>> Starting `basename $CMD` ..."
$CMD $SRCDIR $BACKEND
RC=$?
- if [ $RC -eq 0 ]; then
+ if test $RC -eq 0 ; then
echo ">>>>> $CMD completed OK."
else
echo ">>>>> $CMD failed (exit $RC)"
LDAPADD=../clients/tools/ldapadd
LDAPMODRDN=../clients/tools/ldapmodrdn
SLAPDTESTER=$PROGDIR/slapd-tester
-LVL=${SLAPD_DEBUG-5}
+: ${LVL=$SLAPD_DEBUG}
ADDR=127.0.0.1
PORT=9009
SLAVEPORT=9010
-#!/bin/sh
+#! /bin/sh
. scripts/defines.sh
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'objectClass=*' > $SEARCHOUT 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
kill -HUP $PID
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
exit $RC
fi
echo "Comparing retrieved entries to LDIF file used to create database"
cmp $SEARCHOUT $LDIF
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "comparison failed - database was not created correctly"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'objectClass=*' > $SEARCHOUT 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
kill -HUP $PID
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
exit $RC
fi
echo "Comparing retrieved entries to LDIF file used to create database"
cmp $SEARCHOUT $LDIF
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "comparison failed - database was not created correctly"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
$LDAPSEARCH -L -b "$BASEDN" -h localhost -p $PORT \
'cn=Monitor' > /dev/null 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
$LDAPMODIFY -a -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
$LDIFORDERED > /dev/null 2>&1
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapmodify failed!"
kill -HUP $PID
exit $RC
kill -HUP $PID
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
exit $RC
fi
echo "Comparing filter output..."
cmp $SEARCHFLT $LDIFFLT
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "comparison failed - database was not created correctly"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'cn=Manager' > /dev/null 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
done
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
echo "Testing exact searching..."
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'sn=jensen' >> $TESTOUT 2>&1
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
echo "Testing OR searching..."
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'(|(objectclass=rfc822mailgroup)(sn=jones))' >> $TESTOUT 2>&1
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
echo "Testing AND matching and ends-with searching..."
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'(&(objectclass=rfc822mailgroup)(cn=A*))' >> $TESTOUT 2>&1
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'(!(objectclass=person))' | grep -v "^modifytimestamp:" \
>> $TESTOUT 2>&1
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
echo "Comparing results"
cmp $TESTOUT $SEARCHOUTMASTER
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "Comparison failed"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'cn=Manager' > /dev/null 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
done
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
EOMODS
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapmodify failed!"
kill -HUP $PID
exit $RC
> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
exit $RC
fi
echo "Comparing database to reference file"
cmp $SEARCHOUT $MODIFYOUTMASTER
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "comparison failed - modify operations did not complete correctly"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'cn=Manager' > /dev/null 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
done
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
/dev/null 2>&1 'cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US' 'cn=James A Jones III'
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapmodrdn failed!"
kill -HUP $PID
exit $RC
/dev/null 2>&1 'cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US' 'cn=James A Jones II'
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapmodrdn failed!"
kill -HUP $PID
exit $RC
> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
exit $RC
fi
echo "Comparing database to reference file"
cmp $SEARCHOUT $MODRDNOUTMASTER
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "comparison failed - modrdn operations did not complete correctly"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'cn=Monitor' > /dev/null 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
done
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID
exit $RC
'objectClass=*' | . $SRCDIR/scripts/acfilter.sh >> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
exit $RC
fi
echo "Comparing database to reference file"
cmp $SEARCHOUT $ACLOUTMASTER
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "comparison failed - modify operations did not complete correctly"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
#
# Test replication:
# - retrieve database over ldap and compare against expected results
#
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
$LDAPSEARCH -L -b "$BASEDN" -h localhost -p $PORT \
'cn=Monitor' > /dev/null 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
$LDAPSEARCH -L -b "$BASEDN" -h localhost -p $SLAVEPORT \
'cn=Monitor' > /dev/null 2>&1
RC=$?
- if [ $RC = 1 ]; then
+ if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
sleep 5
fi
$LDAPMODIFY -a -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
$LDIFORDERED > /dev/null 2>&1
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapmodify failed!"
kill -HUP $PID $SLAVEPID $SLURPPID
exit $RC
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'objectclass=*' > $MASTEROUT 2>&1
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID $SLAVEPID $SLURPPID
exit $RC
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
'objectclass=*' > $SLAVEOUT 2>&1
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
kill -HUP $PID $SLAVEPID $SLURPPID
exit $RC
echo "Comparing retrieved entries from master and slave..."
cmp $MASTEROUT $SLAVEOUT
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "test failed - master and slave databases differ"
exit 1
fi
-#!/bin/sh
+#! /bin/sh
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
-if [ $# -eq 1 ]; then
+if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "Cleaning up in $DBDIR..."
-rm -f $DBDIR/[!C]*
+rm -f $DBDIR/[!C*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldif2ldbm failed!"
exit $RC
fi
$SLAPDTESTER -b "$BASEDN" -P "$PROGDIR" -d "$DATADIR" -h localhost -p $PORT -D "$MANAGERDN" -w $PASSWD -l 50
RC=$?
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "slapd-tester failed!"
exit $RC
fi
kill -HUP $PID
-if [ $RC != 0 ]; then
+if test $RC != 0 ; then
echo "ldapsearch failed!"
exit $RC
fi
echo "Comparing retrieved entries to LDIF file used to create database"
cmp $SEARCHOUT $LDIF
-if [ $? != 0 ]; then
+if test $? != 0 ; then
echo "comparison failed - database was not created correctly"
exit 1
fi