op->o_bd = frontendDB;
}
- if ( !dryrun && be ) {
+ if ( !dryrun ) {
ID id;
+ if ( be == NULL ) {
+ fprintf( stderr, "%s: no target database "
+ "has been found for baseDN=\"%s\"; "
+ "you may try with \"-u\" (dry run).\n",
+ baseDN.bv_val, progname );
+ rc = 1;
+ goto destroy;
+ }
+
if ( !be->be_entry_open ||
!be->be_entry_close ||
!be->be_dn2id_get ||
mal_leaktrace(1);
#endif
- if ( !dryrun && slap_startup( be ) ) {
+ if ( !dryrun && be && slap_startup( be ) ) {
switch ( tool ) {
case SLAPTEST:
fprintf( stderr, "slap_startup failed "