case SLAPADD:
options = "\n\t[-n databasenumber | -b suffix]\n"
- "\t[-l ldiffile] [-u] [-p [-w] | -r [-i syncreplidlist] [-w]]\n";
+ "\t[-l ldiffile] [-q] [-u] [-w]\n";
break;
case SLAPAUTH:
case SLAPCAT:
options = "\n\t[-n databasenumber | -b suffix]"
- " [-l ldiffile] [-a filter] [-m] [-k]\n";
+ " [-l ldiffile] [-a filter]\n";
break;
case SLAPDN:
break;
case SLAPINDEX:
- options = "\n\t[-n databasenumber | -b suffix]\n";
+ options = "\n\t[-n databasenumber | -b suffix] [-q]\n";
break;
case SLAPTEST:
int truncatemode = 0;
#ifdef CSRIMALLOC
- leakfilename = malloc( strlen( progname ) + STRLEOF( ".leak" ) - 1 );
+ leakfilename = malloc( strlen( progname ) + STRLENOF( ".leak" ) + 1 );
sprintf( leakfilename, "%s.leak", progname );
if( ( leakfile = fopen( leakfilename, "w" )) == NULL ) {
leakfile = stderr;
switch( tool ) {
case SLAPADD:
- options = "b:cd:f:i:l:n:prtuvWw";
+ options = "b:cd:f:l:n:qtuvw";
break;
case SLAPCAT:
- options = "a:b:cd:f:kl:mn:s:v";
+ options = "a:b:cd:f:l:n:s:v";
mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
break;
break;
case SLAPINDEX:
- options = "b:cd:f:n:v";
+ options = "b:cd:f:n:qv";
mode |= SLAP_TOOL_READMAIN;
break;
conffile = strdup( optarg );
break;
- case 'i': /* specify syncrepl id list */
- replica_id_string = strdup( optarg );
- if ( !isdigit( (unsigned char) *replica_id_string )) {
- usage( tool, progname );
- exit( EXIT_FAILURE );
- }
- slap_str2clist( &replica_id_strlist, replica_id_string, "," );
- for ( i = 0; replica_id_strlist && replica_id_strlist[i]; i++ ) ;
- replica_id_list = ch_calloc( i + 1, sizeof( int ) );
- for ( i = 0; replica_id_strlist && replica_id_strlist[i]; i++ ) {
- replica_id_list[i] = atoi( replica_id_strlist[i] );
- if ( replica_id_list[i] >= 1000 ) {
- fprintf(stderr,
- "%s: syncrepl id %d is out of range [0..999]\n",
- progname, replica_id_list[i] );
- exit( EXIT_FAILURE );
- }
- }
- replica_id_list[i] = -1;
- break;
-
- case 'k': /* Retrieve sync cookie entry */
- retrieve_synccookie = 1;
- break;
-
case 'l': /* LDIF file */
ldiffile = strdup( optarg );
break;
- case 'm': /* Retrieve ldapsync entry */
- retrieve_ctxcsn = 1;
- break;
-
case 'M':
ber_str2bv( optarg, 0, 0, &mech );
break;
dbnum = atoi( optarg ) - 1;
break;
- case 'p': /* replica promotion */
- replica_promotion = 1;
- break;
-
- case 'r': /* replica demotion */
- replica_demotion = 1;
+ case 'q': /* turn on quick */
+ mode |= SLAP_TOOL_QUICK;
break;
case 'R':
verbose++;
break;
- case 'W': /* write context csn on every entry add */
- update_ctxcsn = SLAP_TOOL_CTXCSN_BATCH;
- /* FIXME : update_ctxcsn = SLAP_TOOL_CTXCSN_ENTRY; */
- break;
-
- case 'w': /* write context csn on at the end */
- update_ctxcsn = SLAP_TOOL_CTXCSN_BATCH;
+ case 'w': /* write context csn at the end */
+ update_ctxcsn++;
break;
case 'X':
usage( tool, progname );
}
- if ( replica_promotion && replica_demotion ) {
- usage( tool, progname );
-
- } else if ( !replica_promotion && !replica_demotion ) {
- if ( update_ctxcsn != SLAP_TOOL_CTXCSN_KEEP ) {
- usage( tool, progname );
- }
- }
break;
case SLAPDN:
exit( EXIT_FAILURE );
}
+ at_oc_cache = 1;
ldap_syslog = 0;
switch ( tool ) {