From e5095d0185846a7d1a89a519791fa93496fde7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Wed, 27 Jan 2016 18:57:21 +0100 Subject: [PATCH] [fix] Remove old dbconfig settings from slapd.conf --- data/hooks/conf_regen/06-slapd | 2 +- data/templates/slapd/slapd.conf | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/data/hooks/conf_regen/06-slapd b/data/hooks/conf_regen/06-slapd index 491a366a5..f9d751bce 100644 --- a/data/hooks/conf_regen/06-slapd +++ b/data/hooks/conf_regen/06-slapd @@ -30,7 +30,7 @@ backend=$(sudo slapcat -n 0 | sed -n 's/^dn: olcDatabase={1}\(.*\),cn=config$/\1 # Save current database in case of a backend change BACKEND_CHANGE=0 BACKUP_DIR="/var/backups/dc=yunohost,dc=org-${backend}-$(date +%s)" -if [[ "$backend" != "mdb" && "$force" == "True" ]]; then +if [[ -n "$backend" && "$backend" != "mdb" && "$force" == "True" ]]; then BACKEND_CHANGE=1 sudo mkdir -p "$BACKUP_DIR" sudo slapcat -b dc=yunohost,dc=org \ diff --git a/data/templates/slapd/slapd.conf b/data/templates/slapd/slapd.conf index 6178ae00e..9a8800d9d 100644 --- a/data/templates/slapd/slapd.conf +++ b/data/templates/slapd/slapd.conf @@ -62,22 +62,6 @@ suffix "dc=yunohost,dc=org" # Where the database file are physically stored for database #1 directory "/var/lib/ldap" -# The dbconfig settings are used to generate a DB_CONFIG file the first -# time slapd starts. They do NOT override existing an existing DB_CONFIG -# file. You should therefore change these settings in DB_CONFIG directly -# or remove DB_CONFIG and restart slapd for changes to take effect. - -# Sven Hartge reported that he had to set this value incredibly high -# to get slapd running at all. See http://bugs.debian.org/303057 for more -# information. - -# Number of objects that can be locked at the same time. -dbconfig set_lk_max_objects 1500 -# Number of locks (both requested and granted) -dbconfig set_lk_max_locks 1500 -# Number of lockers -dbconfig set_lk_max_lockers 1500 - # Indexing options for database #1 index objectClass eq index uid eq,sub