]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/tools/slapcommon.c
Add search no-op support.
[openldap] / servers / slapd / tools / slapcommon.c
index 030c1466f3d313fa10fb508946d93142d10aafe0..bcea08993ff788d556dfc9a97ebbd94afb4f20d9 100644 (file)
@@ -25,6 +25,7 @@ int           truncatemode = 0;
 int            verbose         = 0;
 int            continuemode = 0;
 int            nosubordinates = 0;
+int            dryrun = 0;
 
 char   *ldiffile       = NULL;
 FILE   *ldiffp         = NULL;
@@ -97,7 +98,7 @@ slap_tool_init(
 
        switch( tool ) {
        case SLAPADD:
-               options = "b:cd:f:l:n:tv";
+               options = "b:cd:f:l:n:tuv";
                break;
 
        case SLAPINDEX:
@@ -148,6 +149,10 @@ slap_tool_init(
                        mode |= SLAP_TRUNCATE_MODE;
                        break;
 
+               case 'u':       /* dry run */
+                       dryrun++;
+                       break;
+
                case 'v':       /* turn on verbose */
                        verbose++;
                        break;
@@ -232,7 +237,7 @@ slap_tool_init(
                /* If the named base is a glue master, operate on the
                 * entire context
                 */
-               if (be->be_glueflags & SLAP_GLUE_INSTANCE)
+               if (be->be_flags & SLAP_BFLAG_GLUE_INSTANCE)
                        nosubordinates = 1;
 
        } else if ( dbnum == -1 ) {
@@ -240,7 +245,7 @@ slap_tool_init(
                /* If just doing the first by default and it is a
                 * glue subordinate, find the master.
                 */
-               while (be->be_glueflags & SLAP_GLUE_SUBORDINATE) {
+               while (be->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE) {
                        nosubordinates = 1;
                        be++;
                }