mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-01 14:15:49 +08:00
Report return code on failure
This commit is contained in:
parent
f6cda93bd1
commit
daacf23672
@ -24,7 +24,7 @@ echo "Running slapadd to build slapd database..."
|
||||
$LDIF2LDBM -f $CONF -l $LDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed!"
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
@ -46,7 +46,7 @@ done
|
||||
kill -HUP $PID
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
@ -37,7 +37,7 @@ $LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
|
||||
$LDIFORDERED > $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapadd failed!"
|
||||
echo "ldapadd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -49,7 +49,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
kill -HUP $PID
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
@ -21,7 +21,7 @@ echo "Running slapadd to build slapd database..."
|
||||
$LDIF2LDBM -f $CONF -l $LDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed!"
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
@ -41,7 +41,7 @@ for i in 0 1 2 3 4 5; do
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -52,7 +52,7 @@ echo "Testing exact searching..."
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'sn=jensen' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -61,7 +61,7 @@ echo "Testing OR searching..."
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -70,7 +70,7 @@ echo "Testing AND matching and ends-with searching..."
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -79,7 +79,7 @@ echo "Testing NOT searching..."
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'(!(objectclass=person))' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
|
@ -21,7 +21,7 @@ echo "Running slapadd to build slapd database..."
|
||||
$LDIF2LDBM -f $CONF -l $LDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed!"
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
@ -41,7 +41,7 @@ for i in 0 1 2 3 4 5; do
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -113,7 +113,7 @@ EOMODS
|
||||
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapmodify failed!"
|
||||
echo "ldapmodify failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -124,7 +124,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
RC=$?
|
||||
kill -HUP $PID
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
@ -21,7 +21,7 @@ echo "Running slapadd to build slapd database..."
|
||||
$LDIF2LDBM -f $CONF -l $LDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed!"
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
@ -41,7 +41,7 @@ for i in 0 1 2 3 4 5; do
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -120,7 +120,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
RC=$?
|
||||
kill -HUP $PID
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
@ -73,7 +73,7 @@ $LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
|
||||
$LDIFORDERED > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapadd failed!"
|
||||
echo "ldapadd failed ($RC)!"
|
||||
kill -HUP $PID $SLAVEPID $SLURPPID
|
||||
exit $RC
|
||||
fi
|
||||
@ -148,7 +148,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'objectclass=*' > $MASTEROUT 2>&1
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID $SLAVEPID $SLURPPID
|
||||
exit $RC
|
||||
fi
|
||||
@ -158,7 +158,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
|
||||
'objectclass=*' > $SLAVEOUT 2>&1
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID $SLAVEPID $SLURPPID
|
||||
exit $RC
|
||||
fi
|
||||
|
@ -24,7 +24,7 @@ echo "Running slapadd to build slapd database..."
|
||||
$LDIF2LDBM -f $CONF -l $LDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed!"
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
@ -51,7 +51,7 @@ $SLAPDTESTER -b "$BASEDN" -P "$PROGDIR" -d "$DATADIR" -h localhost -p $PORT -D "
|
||||
RC=$?
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "slapd-tester failed!"
|
||||
echo "slapd-tester failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
@ -63,7 +63,7 @@ RC=$?
|
||||
kill -HUP $PID
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
@ -26,7 +26,7 @@ echo "Running slapadd to build slapd database..."
|
||||
$LDIF2LDBM -f $CONF -l $LDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed!"
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
@ -50,7 +50,7 @@ for i in 0 1 2 3 4 5; do
|
||||
done
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -72,7 +72,7 @@ echo "Testing exact searching..."
|
||||
$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
|
||||
'sn=jensen' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID $SLAVEPID
|
||||
exit $RC
|
||||
fi
|
||||
@ -81,7 +81,7 @@ echo "Testing OR searching..."
|
||||
$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
|
||||
'(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID $SLAVEPID
|
||||
exit $RC
|
||||
fi
|
||||
@ -90,7 +90,7 @@ echo "Testing AND matching and ends-with searching..."
|
||||
$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
|
||||
'(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID $SLAVEPID
|
||||
exit $RC
|
||||
fi
|
||||
@ -99,7 +99,7 @@ echo "Testing NOT searching..."
|
||||
$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
|
||||
'(!(objectclass=person))' >> $SEARCHOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
echo "ldapsearch failed ($RC)!"
|
||||
kill -HUP $PID $SLAVEPID
|
||||
exit $RC
|
||||
fi
|
||||
|
@ -37,7 +37,7 @@ $LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
|
||||
$LDIFPASSWD > $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapadd failed!"
|
||||
echo "ldapadd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -59,7 +59,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
"cn=md5, $BASEDN" >> $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -67,7 +67,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
-w secret -s newsecret \
|
||||
"cn=smd5, $BASEDN" >> $TESTOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -75,7 +75,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
-w secret -s newsecret \
|
||||
"cn=sha, $BASEDN" >> $TESTOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -83,7 +83,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
-w secret -s newsecret \
|
||||
"cn=ssha, $BASEDN" >> $TESTOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -95,7 +95,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
-w newsecret \
|
||||
"cn=md5, $BASEDN" >> $TESTOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -103,7 +103,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
-w newsecret \
|
||||
"cn=smd5, $BASEDN" >> $TESTOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -111,7 +111,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
-w newsecret \
|
||||
"cn=sha, $BASEDN" >> $TESTOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
@ -119,7 +119,7 @@ $LDAPPASSWD -h localhost -p $PORT \
|
||||
-w newsecret \
|
||||
"cn=ssha, $BASEDN" >> $TESTOUT 2>&1
|
||||
if test $RC != 0 ; then
|
||||
echo "ldappasswd failed!"
|
||||
echo "ldappasswd failed ($RC)!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user