mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ldapmodify doesn't return an LDAP error code
This commit is contained in:
parent
385aebc806
commit
a9baa69375
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user