]> git.sur5r.net Git - openldap/commitdiff
Check return of ldapadd(1)
authorKurt Zeilenga <kurt@openldap.org>
Tue, 20 Dec 2005 21:54:47 +0000 (21:54 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 20 Dec 2005 21:54:47 +0000 (21:54 +0000)
tests/scripts/test026-dn

index 1b5c9ac9674caae5a61c6f298ba2660fb9dcd9ef..0dfb6fff701351921df4d107c0cd94cfd2e70af7 100755 (executable)
@@ -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