valsort-attr employeeType ou=users,o=valsort weighted alpha-ascend
database config
-rootpw secret
+rootpw @CONFIGPW@
#monitor#database monitor
-e "s;@PORT4@;${PORT4};" \
-e "s;@PORT5@;${PORT5};" \
-e "s;@PORT6@;${PORT6};" \
+ -e "s/@CONFIGPW@/${CONFIGPW}/" \
-e "s/@SASL_MECH@/${SASL_MECH}/" \
-e "s/@CACHETTL@/${CACHETTL}/" \
-e "s/@ENTRY_LIMIT@/${CACHE_ENTRY_LIMIT}/" \
SLAPADD="../servers/slapd/slapd -Ta -d 0 $LDAP_VERBOSE"
SLAPCAT="../servers/slapd/slapd -Tc -d 0 $LDAP_VERBOSE"
SLAPINDEX="../servers/slapd/slapd -Ti -d 0 $LDAP_VERBOSE"
+SLAPPASSWD="../servers/slapd/slapd -Tpasswd"
+
+CONFIGPWF=$TESTDIR/configpw
unset DIFF_OPTIONS
# NOTE: -u/-c is not that portable...
mkdir -p $TESTDIR $DBDIR1
+$SLAPPASSWD -g > $CONFIGPWF
+RC=$?
+if test $RC != 0 ; then
+ echo "slappasswd failed ($RC)!"
+ exit $RC
+fi
+read CONFIGPW < $CONFIGPWF
+
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $VALSORTCONF > $CONF1
$SLAPADD -f $CONF1 -l $LDIFVALSORT
echo "Reconfiguring slapd to test valsort descending"
-$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -w $PASSWD > \
+$LDAPMODIFY -x -D cn=config -h $LOCALHOST -p $PORT1 -y $CONFIGPWF > \
$TESTOUT 2>&1 << EOMODS
version: 1
dn: olcOverlay={0}valsort,olcDatabase={1}$BACKEND,cn=config