ldapmodify doesn't return an LDAP error code

This commit is contained in:
Pierangelo Masarati 2005-10-05 01:22:26 +00:00
parent 385aebc806
commit a9baa69375
2 changed files with 10 additions and 30 deletions

View File

@ -281,9 +281,10 @@ KILLPIDS="$KILLPIDS $SLURPPID"
echo "Waiting 15 seconds for slurpd to send changes..."
sleep 15
echo "Try updating the slave slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
if test ! $BACKLDAP = "ldapno" ; then
echo "Try updating the slave slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
changetype: modify
add: description
@ -292,18 +293,7 @@ description: unless the chain overlay is configured appropriately ;)
EOMODS
RC=$?
if test $BACKLDAP = "ldapno" ; then
# expect 10 (LDAP_REFERRAL)...
if test $RC != 10 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
else
# expect 0 (LDAP_SUCCESS)...
RC=$?
if test $RC != 0 ; then
echo "ldapmodify failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS

View File

@ -279,9 +279,10 @@ KILLPIDS="$PID $SLAVEPID"
echo "Waiting 25 seconds for syncrepl to receive changes..."
sleep 25
echo "Try updating the slave slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT4 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
if test ! $BACKLDAP = "ldapno" ; then
echo "Try updating the slave slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT4 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
changetype: modify
add: description
@ -290,18 +291,7 @@ description: unless the chain overlay is configured appropriately ;)
EOMODS
RC=$?
if test $BACKLDAP = "ldapno" ; then
# expect 10 (LDAP_REFERRAL)...
if test $RC != 10 ; then
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
else
# expect 0 (LDAP_SUCCESS)...
RC=$?
if test $RC != 0 ; then
echo "ldapmodify failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS