int verbose = 0;
int continuemode = 0;
int nosubordinates = 0;
+int dryrun = 0;
char *ldiffile = NULL;
FILE *ldiffp = NULL;
switch( tool ) {
case SLAPADD:
- options = "b:cd:f:l:n:tv";
+ options = "b:cd:f:l:n:tuv";
break;
case SLAPINDEX:
mode |= SLAP_TRUNCATE_MODE;
break;
+ case 'u': /* dry run */
+ dryrun++;
+ break;
+
case 'v': /* turn on verbose */
verbose++;
break;
* initialize stuff and figure out which backend we're dealing with
*/
+#ifdef SLAPD_MODULES
+ if ( module_init() != 0 ) {
+ fprintf( stderr, "%s: module_init failed!\n", progname );
+ exit( EXIT_FAILURE );
+ }
+#endif
+
rc = slap_init( mode, progname );
if (rc != 0 ) {
exit( EXIT_FAILURE );
}
- read_config( conffile );
+ rc = read_config( conffile, 0 );
+
+ if ( rc != 0 ) {
+ fprintf( stderr, "%s: bad configuration file!\n", progname );
+ exit( EXIT_FAILURE );
+ }
if ( !nbackends ) {
fprintf( stderr, "No databases found in config file\n" );
/* 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 ) {
/* 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++;
}
{
slap_shutdown( be );
slap_destroy();
+#ifdef SLAPD_MODULES
+ if ( slapMode == SLAP_SERVER_MODE ) {
+ /* always false. just pulls in necessary symbol references. */
+ lutil_uuidstr(NULL, 0);
+ }
+ module_kill();
+#endif
+ schema_destroy();
+#ifdef HAVE_TLS
+ ldap_pvt_tls_destroy();
+#endif
+ config_destroy();
#ifdef CSRIMALLOC
mal_dumpleaktrace( leakfile );