+ if ( glue_sub_init( ) != 0 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( SLAPD, CRIT, "main: subordinate config error\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "subordinate config error\n",
+ 0, 0, 0 );
+#endif
+ goto destroy;
+ }
+
+ if ( slap_schema_check( ) != 0 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( SLAPD, CRIT, "main: schema prep error\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "schema prep error\n",
+ 0, 0, 0 );
+#endif
+
+ goto destroy;
+ }
+
+#ifdef HAVE_TLS
+ rc = ldap_pvt_tls_init();
+ if( rc != 0) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( SLAPD, CRIT, "main: tls init failed: %d\n", rc, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "main: TLS init failed: %d\n",
+ 0, 0, 0 );
+#endif
+ rc = 1;
+ SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
+ goto destroy;
+ }
+
+ rc = ldap_pvt_tls_init_def_ctx();
+ if( rc != 0) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( SLAPD, CRIT, "main: tls init def ctx failed: %d\n", rc, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "main: TLS init def ctx failed: %d\n",
+ rc, 0, 0 );
+#endif
+ rc = 1;
+ SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
+ goto destroy;
+ }
+#endif
+
+ (void) SIGNAL( LDAP_SIGUSR1, slap_sig_wake );
+ (void) SIGNAL( LDAP_SIGUSR2, slap_sig_shutdown );