Use backend#0 for config, tools default to #1

This commit is contained in:
Howard Chu 2005-02-21 11:28:59 +00:00
parent 2b725a3dfe
commit 087b97c2c5
2 changed files with 3 additions and 6 deletions

View File

@ -344,6 +344,7 @@ config_back_initialize( BackendInfo *bi )
return 0;
}
void config_back_init( ConfigFile *cfp, ConfigTable *ct )
{
BackendInfo bi = {0};
@ -355,10 +356,6 @@ void config_back_init( ConfigFile *cfp, ConfigTable *ct )
bi.bi_init = config_back_initialize;
bi.bi_cf_table = ct;
backend_add( &bi );
/* FIXME */
if ( slapMode & SLAP_TOOL_MODE ) {
return;
}
be = backend_db_init( bi.bi_type );
ber_str2bv( CONFIG_DN, 0, 1, &be->be_rootdn );
ber_dupbv( &be->be_rootndn, &be->be_rootdn );

View File

@ -201,7 +201,7 @@ 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 */
@ -441,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.
*/