]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test020-proxycache
Fail if proxy cannot be started.
[openldap] / tests / scripts / test020-proxycache
index 7ad5bcea2e1a62a64fc4c0a4cf73c349b50b56d7..c4779f33bf781ca88cd0620411d695e8d0ecdccc 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2003 The OpenLDAP Foundation.
+## Copyright 1998-2004 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -94,6 +94,12 @@ for i in 0 1 2 3 4 5; do
        sleep 5
 done
 
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 echo "Making queries on the proxy cache..." 
 echo "Query 1: filter:(sn=Jon) attrs: all" 
 $LDAPSEARCH -x -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \