]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapcommon.c
fix ITS#3406 wrt/ dnattr; silence warning
[openldap] / servers / slapd / slapcommon.c
index 1812ede6e37f45f13be772ba0bcf4849ac598654..56c2b613c1bba25eb24bc9a94b3fa2f687d276d5 100644 (file)
@@ -60,7 +60,7 @@ usage( int tool, const char *progname )
 
        case SLAPADD:
                options = "\n\t[-n databasenumber | -b suffix]\n"
-                       "\t[-l ldiffile] [-u] [-w]\n";
+                       "\t[-l ldiffile] [-q] [-u] [-w]\n";
                break;
 
        case SLAPAUTH:
@@ -77,7 +77,7 @@ usage( int tool, const char *progname )
                break;
 
        case SLAPINDEX:
-               options = "\n\t[-n databasenumber | -b suffix]\n";
+               options = "\n\t[-n databasenumber | -b suffix] [-q]\n";
                break;
 
        case SLAPTEST:
@@ -127,7 +127,7 @@ slap_tool_init(
 
        switch( tool ) {
        case SLAPADD:
-               options = "b:cd:f:l:n:tuvw";
+               options = "b:cd:f:l:n:qtuvw";
                break;
 
        case SLAPCAT:
@@ -151,7 +151,7 @@ slap_tool_init(
                break;
 
        case SLAPINDEX:
-               options = "b:cd:f:n:v";
+               options = "b:cd:f:n:qv";
                mode |= SLAP_TOOL_READMAIN;
                break;
 
@@ -201,7 +201,11 @@ slap_tool_init(
                        break;
 
                case 'n':       /* which config file db to index */
-                       dbnum = atoi( optarg ) - 1;
+                       dbnum = atoi( optarg );
+                       break;
+
+               case 'q':       /* turn on quick */
+                       mode |= SLAP_TOOL_QUICK;
                        break;
 
                case 'R':
@@ -437,7 +441,7 @@ slap_tool_init(
                        exit( EXIT_FAILURE );
                }
                
-               be = &backends[dbnum=0];
+               be = &backends[dbnum=1];
                /* If just doing the first by default and it is a
                 * glue subordinate, find the master.
                 */