mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 06:01:23 -05:00
Fix slapd startup ldapsearch loop
This commit is contained in:
parent
8f09321eb9
commit
f22855e6be
16 changed files with 81 additions and 61 deletions
|
|
@ -41,10 +41,11 @@ echo "Using ldapsearch to retrieve the root DSE..."
|
|||
for i in 0 1 2 3 4 5; do
|
||||
$LDAPSEARCH -b "" -s base -h $LOCALHOST -p $PORT 'extensibleObject' > $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if test $RC = 0 -a $MONITORDB = yes ; then
|
||||
|
|
|
|||
|
|
@ -49,10 +49,11 @@ echo "Using ldapsearch to retrieve all the entries..."
|
|||
for i in 0 1 2 3 4 5; do
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT > $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
kill -HUP $PID
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Using ldapadd to populate the database..."
|
||||
|
|
|
|||
|
|
@ -56,10 +56,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'(objectclass=*)' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
|
|
|
|||
|
|
@ -50,10 +50,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
|
|
|
|||
|
|
@ -48,10 +48,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
|
||||
'objectClass=*' > $INITOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
|
|
|
|||
|
|
@ -47,10 +47,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
|
|
|
|||
|
|
@ -65,21 +65,23 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
|
||||
echo "Using ldapsearch to check that slave slapd is running..."
|
||||
for i in 0 1 2 3 4 5; do
|
||||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Starting slurpd..."
|
||||
|
|
|
|||
|
|
@ -52,10 +52,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Using tester for concurrent server access..."
|
||||
|
|
|
|||
|
|
@ -62,10 +62,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
|
|
@ -79,10 +80,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
cat /dev/null > $SEARCHOUT
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Using ldapadd to populate the database..."
|
||||
|
|
|
|||
|
|
@ -70,10 +70,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Using ldapsearch to check that slave slapd is running..."
|
||||
|
|
@ -81,10 +82,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Starting slurpd..."
|
||||
|
|
|
|||
|
|
@ -49,10 +49,11 @@ cd test-db
|
|||
for i in 0 1 2 3 4 5; do
|
||||
../$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT > ../$SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
cd ..
|
||||
|
||||
|
|
@ -96,10 +97,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Using ldapadd to populate the glued database..."
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Using ldapadd to populate the database..."
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Testing ldapwhoami ..."
|
||||
|
|
|
|||
|
|
@ -56,10 +56,11 @@ for i in 0 1 2 3 4 5; do
|
|||
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
|
||||
'objectclass=*' > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 1 ; then
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
if test $RC = 0 ; then
|
||||
break
|
||||
fi
|
||||
echo "Waiting 5 seconds for slapd to start..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue