]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test012-glue
More streamlining.
[openldap] / tests / scripts / test012-glue
index ff5b1ec2f8d5b456eb8344bc7d5ea3242dcd9eb8..a8b93f06985effbd73364fda4e795697ff1a3738 100755 (executable)
@@ -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..."