mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
ldapmodify/add: Fix -P option
tests: use "ldapadd" instead of "ldapmodify -a"
This commit is contained in:
parent
dcc5bdfe7e
commit
bf8eaf1f1e
@ -116,7 +116,7 @@ main( int argc, char **argv )
|
||||
authmethod = LDAP_AUTH_SIMPLE;
|
||||
version = -1;
|
||||
|
||||
while (( i = getopt( argc, argv, "WFabckKnrtvh:p:D:w:d:f:" )) != EOF ) {
|
||||
while (( i = getopt( argc, argv, "WFabckKnrtvh:p:D:w:d:f:P:" )) != EOF ) {
|
||||
switch( i ) {
|
||||
case 'a': /* add */
|
||||
new = 1;
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
|
||||
if test "$LDAP_PROTO" ; then
|
||||
PROTO="-P $LDAP_PROTO"
|
||||
else
|
||||
PROTO=""
|
||||
fi
|
||||
|
||||
PASSWDCONF=$DATADIR/slapd-passwd.conf
|
||||
|
@ -31,12 +31,12 @@ for i in 0 1 2 3 4 5; do
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Using ldapmodify to populate the database..."
|
||||
$LDAPMODIFY -a -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
|
||||
echo "Using ldapadd to populate the database..."
|
||||
$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
|
||||
$LDIFORDERED > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapmodify failed!"
|
||||
echo "ldapadd failed!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
|
@ -67,12 +67,12 @@ echo "Starting slurpd..."
|
||||
$SLURPD -f $MASTERCONF -d 4 -t $REPLDIR > $SLURPLOG 2>&1 &
|
||||
SLURPPID=$!
|
||||
|
||||
echo "Using ldapmodify to populate the database..."
|
||||
$LDAPMODIFY -a -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
|
||||
echo "Using ldapadd to populate the database..."
|
||||
$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
|
||||
$LDIFORDERED > /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapmodify failed!"
|
||||
echo "ldapadd failed!"
|
||||
kill -HUP $PID $SLAVEPID $SLURPPID
|
||||
exit $RC
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user