From 512a70af4702350af017b9df0e8f43c94dade407 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 17 Jul 2004 15:35:06 +0000 Subject: [PATCH] more cleanup --- servers/slapd/slapadd.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/servers/slapd/slapadd.c b/servers/slapd/slapadd.c index 677e7b1fd4..8d6c54503d 100644 --- a/servers/slapd/slapadd.c +++ b/servers/slapd/slapadd.c @@ -94,7 +94,12 @@ slapadd( int argc, char **argv ) { fprintf( stderr, "%s: database doesn't support necessary operations.\n", progname ); - exit( EXIT_FAILURE ); + if ( dryrun ) { + fprintf( stderr, "\t(dry) continuing...\n" ); + + } else { + exit( EXIT_FAILURE ); + } } lmax = 0; @@ -725,12 +730,18 @@ done:; ch_free( buf ); - if( be->be_entry_close( be )) rc = EXIT_FAILURE; + if ( !dryrun ) { + if( be->be_entry_close( be ) ) { + rc = EXIT_FAILURE; + } - if( be->be_sync ) { - be->be_sync( be ); + if( be->be_sync ) { + be->be_sync( be ); + } } slap_tool_destroy(); + return rc; } + -- 2.39.5