[Pkg-openldap-devel] [openldap] 04/07: re-introduce @BACKENDOPTIONS@ for mdb

Ryan Tandy rtandy-guest at moszumanska.debian.org
Fri Aug 29 05:22:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

rtandy-guest pushed a commit to branch master
in repository openldap.

commit ed2f6b0785a599f9a708e57abd9b22c13074b62f
Author: Ryan Tandy <ryan at nardis.ca>
Date:   Fri Aug 8 21:29:57 2014 -0700

    re-introduce @BACKENDOPTIONS@ for mdb
---
 debian/slapd.init.ldif      |  5 +----
 debian/slapd.scripts-common | 15 +++++++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/debian/slapd.init.ldif b/debian/slapd.init.ldif
index 6a237e0..6fefcae 100644
--- a/debian/slapd.init.ldif
+++ b/debian/slapd.init.ldif
@@ -62,10 +62,7 @@ objectClass: olcDatabaseConfig
 objectClass: @BACKENDOBJECTCLASS@
 olcDatabase: @BACKEND@
 olcDbCheckpoint: 512 30
-olcDbConfig: set_cachesize 0 2097152 0
-olcDbConfig: set_lk_max_objects 1500
-olcDbConfig: set_lk_max_locks 1500
-olcDbConfig: set_lk_max_lockers 1500
+ at BACKENDOPTIONS@
 olcLastMod: TRUE
 olcSuffix: @SUFFIX@
 olcDbDirectory: /var/lib/ldap
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index 5427204..5d671b5 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -460,15 +460,21 @@ create_new_slapd_conf() {						# {{{
 # Create the new slapd.d directory (configuration)
 # Usage: create_new_slapd_conf <basedn> <backend>
 
-	local initldif failed basedn backend backendobjectclass adminpass
+	local initldif failed basedn backend backendobjectclass backendoptions adminpass
 
 	# Fetch configuration
 	basedn="$1"
 	backend="$2"
-	if [ "$backend" = "hdb" ]; then
-		backendobjectclass="olcHdbConfig"
+	if [ "$backend" = "mdb" ]; then
+		backendoptions="olcDbMaxSize: 1073741824"
+		backendobjectclass="olcMdbConfig"
 	else
-		backendobjectclass="olcBdbConfig"
+		backendoptions="olcDbConfig: set_cachesize 0 2097152 0\nolcDbConfig: set_lk_max_objects 1500\nolcDbConfig: set_lk_max_locks 1500\nolcDbConfig: set_lk_max_lockers 1500"
+		if [ "$backend" = "hdb" ]; then
+			backendobjectclass="olcHdbConfig"
+		else
+			backendobjectclass="olcBdbConfig"
+		fi
 	fi
 	db_get slapd/internal/adminpw
 	adminpass="$RET"
@@ -484,6 +490,7 @@ create_new_slapd_conf() {						# {{{
 	# Change some defaults
 	sed -i -e "s|@BACKEND@|$backend|g" ${initldif}
 	sed -i -e "s|@BACKENDOBJECTCLASS@|$backendobjectclass|g" ${initldif}
+	sed -i -e "s|@BACKENDOPTIONS@|$backendoptions|g" ${initldif}
 	sed -i -e "s|@SUFFIX@|$basedn|g" ${initldif}
 	sed -i -e "s|@PASSWORD@|$adminpass|g" ${initldif}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git



More information about the Pkg-openldap-devel mailing list