mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-05-28 04:35:57 -04:00
Check slapadd result before continuing with test
This commit is contained in:
parent
6b77544ab8
commit
04ca49552e
22 changed files with 142 additions and 0 deletions
|
|
@ -55,6 +55,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
|
|||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
|
|||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
|
|||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
|
|||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ $SLAPADD -f $CONF3 -l $LDIFORDERED
|
|||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,12 @@ esac
|
|||
echo "Starting provider slapd on TCP/IP port $PORT1..."
|
||||
. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
|
||||
$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
cd $PRODIR
|
||||
$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
PID=$!
|
||||
|
|
@ -134,6 +140,13 @@ fi
|
|||
|
||||
echo "Starting consumer slapd on TCP/IP port $PORT2..."
|
||||
$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
cd $CONDIR
|
||||
$SLAPD -F ./slapd.d -h $URI2 -d $LVL > $LOG2 2>&1 &
|
||||
CONSUMERPID=$!
|
||||
|
|
|
|||
|
|
@ -79,6 +79,11 @@ objectClass: olcDatabaseConfig
|
|||
olcDatabase: {0}config
|
||||
olcRootPW:< file://$CONFIGPWF
|
||||
EOF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
done
|
||||
|
|
|
|||
|
|
@ -74,6 +74,11 @@ olcDatabase: {0}config
|
|||
olcRootPW:< file://$CONFIGPWF
|
||||
|
||||
EOF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Initializing provider2 configurations..."
|
||||
$SLAPADD -F $CFPRO2 -n 0 <<EOF
|
||||
|
|
@ -87,6 +92,11 @@ olcDatabase: {0}config
|
|||
olcRootPW:< file://$CONFIGPWF
|
||||
|
||||
EOF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
$SLAPADD -F $CFCONS -n 0 <<EOF
|
||||
dn: cn=config
|
||||
|
|
@ -98,6 +108,11 @@ objectClass: olcDatabaseConfig
|
|||
olcDatabase: {0}config
|
||||
olcRootPW:< file://$CONFIGPWF
|
||||
EOF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Starting provider slapd on TCP/IP port $PORT1..."
|
||||
cd $PRODDIR
|
||||
|
|
|
|||
|
|
@ -175,6 +175,12 @@ olcDatabase: {0}config
|
|||
olcRootPW:< file://$CONFIGPWF
|
||||
|
||||
EOF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
ID=`expr $ID + 1`
|
||||
done
|
||||
|
||||
|
|
@ -191,6 +197,12 @@ olcDatabase: {0}config
|
|||
olcRootPW:< file://$CONFIGPWF
|
||||
|
||||
EOF
|
||||
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Starting central provider slapd on TCP/IP port $PORT1..."
|
||||
|
|
|
|||
|
|
@ -57,6 +57,12 @@ esac
|
|||
echo "Starting provider slapd on TCP/IP port $PORT1..."
|
||||
. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
|
||||
$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
$SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
PID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
|
|
@ -182,6 +188,13 @@ fi
|
|||
|
||||
echo "Starting consumer slapd on TCP/IP port $PORT2..."
|
||||
$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
$SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 &
|
||||
CONSUMERPID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
|
|
|
|||
|
|
@ -82,6 +82,12 @@ olcDatabase: {0}config
|
|||
olcRootPW:< file://$CONFIGPWF
|
||||
|
||||
EOF
|
||||
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Starting provider slapd on $PROV_URI"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF
|
|||
echo "Starting slapd on TCP/IP port $PORT1... $PWD"
|
||||
. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
|
||||
$SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
cd $TESTDIR
|
||||
$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
PID=$!
|
||||
|
|
|
|||
|
|
@ -214,6 +214,12 @@ olcDatabase: {3}monitor
|
|||
EOF
|
||||
|
||||
$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
PORT=`eval echo '$PORT'$n`
|
||||
echo "Starting server $n on TCP/IP port $PORT..."
|
||||
cd ${XDIR}${n}
|
||||
|
|
|
|||
|
|
@ -120,6 +120,11 @@ olcConstraintAttribute: uid
|
|||
EOF
|
||||
|
||||
$SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Starting slapd on TCP/IP port $PORT1..."
|
||||
$SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
|
|
|
|||
|
|
@ -47,6 +47,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF
|
|||
echo "Starting slapd on TCP/IP port $PORT1..."
|
||||
. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
|
||||
$SLAPADD -F $CFDIR -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
$SLAPD -F $CFDIR -h $URIP1 -d $LVL > $LOG1 2>&1 &
|
||||
PID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
|
|
|
|||
|
|
@ -195,7 +195,14 @@ olcAccessLogOps: writes
|
|||
olcAccessLogSuccess: TRUE
|
||||
|
||||
EOF
|
||||
|
||||
$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
PORT=`eval echo '$PORT'$n`
|
||||
echo "Starting server $n on TCP/IP port $PORT..."
|
||||
cd ${XDIR}${n}
|
||||
|
|
|
|||
|
|
@ -195,6 +195,12 @@ olcAccessLogSuccess: TRUE
|
|||
|
||||
EOF
|
||||
$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
PORT=`eval echo '$PORT'$n`
|
||||
echo "Starting server $n on TCP/IP port $PORT..."
|
||||
cd ${XDIR}${n}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,13 @@ objectclass: dcObject
|
|||
o: OpenLDAP Testing
|
||||
|
||||
EOMODS
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
$SLAPD -f $CONF2 -h $URI2 -d $LVL > $LOG2 2>&1 &
|
||||
CONSUMERPID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ $SLAPPASSWD -g -n >$CONFIGPWF
|
|||
echo "Starting slapd on TCP/IP port $PORT1... $PWD"
|
||||
. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
|
||||
$SLAPADD -F $CONFDIR -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
cd $TESTDIR
|
||||
$SLAPD -F ./slapd.d -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
PID=$!
|
||||
|
|
|
|||
|
|
@ -185,6 +185,12 @@ olcAccessLogSuccess: TRUE
|
|||
|
||||
EOF
|
||||
$SLAPADD -F $CFDIR -n 0 -d-1< $TMP > $TESTOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
PORT=`eval echo '$PORT'$n`
|
||||
echo "Starting server $n on TCP/IP port $PORT..."
|
||||
cd ${XDIR}${n}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,11 @@ EOF
|
|||
fi
|
||||
|
||||
$SLAPADD -F $CONFDIR -n 0 -l $TESTDIR/config.ldif
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Starting slapd on TCP/IP port $PORT1..."
|
||||
$SLAPD -F $CONFDIR -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
|
|
|
|||
|
|
@ -61,6 +61,12 @@ esac
|
|||
echo "Starting provider slapd on TCP/IP port $PORT1..."
|
||||
. $CONFFILTER $BACKEND < $DYNAMICCONF > $CONFLDIF
|
||||
$SLAPADD -F $CFPRO -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
$SLAPD -F $CFPRO -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
PID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
|
|
@ -324,6 +330,13 @@ fi
|
|||
|
||||
echo "Starting consumer slapd on TCP/IP port $PORT2..."
|
||||
$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "slapadd failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
$SLAPD -F $CFCON -h $URI2 -d $LVL > $LOG2 2>&1 &
|
||||
CONSUMERPID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue