From bf987dc8fba800d025b817e52bdf369aac542f2d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Dec 2005 21:54:47 +0000 Subject: [PATCH] Check return of ldapadd(1) --- tests/scripts/test026-dn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/scripts/test026-dn b/tests/scripts/test026-dn index 1b5c9ac967..0dfb6fff70 100755 --- a/tests/scripts/test026-dn +++ b/tests/scripts/test026-dn @@ -50,6 +50,12 @@ fi echo "Loading database..." $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD -c -f $LDIFDN > \ /dev/null 2>&1 +RC=$? +if test $RC != 0 ; then + echo "ldapadd failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi echo "Searching database..." $LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1 -- 2.39.5