mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
slapdn calls shutdown without startup
This commit is contained in:
parent
9f2e86c8e3
commit
ce3c024557
@ -174,6 +174,8 @@ parse_slapacl( void )
|
|||||||
* argc, argv command line arguments
|
* argc, argv command line arguments
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static int need_shutdown;
|
||||||
|
|
||||||
void
|
void
|
||||||
slap_tool_init(
|
slap_tool_init(
|
||||||
const char* progname,
|
const char* progname,
|
||||||
@ -663,6 +665,8 @@ startup:;
|
|||||||
|
|
||||||
/* slapdn doesn't specify a backend to startup */
|
/* slapdn doesn't specify a backend to startup */
|
||||||
if ( !dryrun && tool != SLAPDN && slap_startup( be ) ) {
|
if ( !dryrun && tool != SLAPDN && slap_startup( be ) ) {
|
||||||
|
need_shutdown = 1;
|
||||||
|
|
||||||
switch ( tool ) {
|
switch ( tool ) {
|
||||||
case SLAPTEST:
|
case SLAPTEST:
|
||||||
fprintf( stderr, "slap_startup failed "
|
fprintf( stderr, "slap_startup failed "
|
||||||
@ -682,7 +686,9 @@ startup:;
|
|||||||
void slap_tool_destroy( void )
|
void slap_tool_destroy( void )
|
||||||
{
|
{
|
||||||
if ( !dryrun ) {
|
if ( !dryrun ) {
|
||||||
|
if ( need_shutdown ) {
|
||||||
slap_shutdown( be );
|
slap_shutdown( be );
|
||||||
|
}
|
||||||
slap_destroy();
|
slap_destroy();
|
||||||
}
|
}
|
||||||
#ifdef SLAPD_MODULES
|
#ifdef SLAPD_MODULES
|
||||||
|
Loading…
Reference in New Issue
Block a user