[Pkg-openldap-devel] r638 - openldap/trunk-2.3/debian

Matthijs Mohlmann active2-guest at costa.debian.org
Sat May 6 09:37:44 UTC 2006


Author: active2-guest
Date: 2006-05-06 09:37:43 +0000 (Sat, 06 May 2006)
New Revision: 638

Modified:
   openldap/trunk-2.3/debian/slapd.prerm
   openldap/trunk-2.3/debian/slapd.scripts-common
Log:
 * Set the seen flag to false for slapd/migrate_ldbm_to_bdb to get it asked
   again if a user disagrees with the migration.
 * Check in configure_dumping if the questions needs to be asked (user can
   disagree with the slapd/migrate_ldbm_to_bdb question)
 * Remove function break_on_ldbm_to_bdb_migration_disagree, we don't use it.
 * Fix a bashism.
 * Add ldbm to supported_backend, removing it will break the upgrade procedure.


Modified: openldap/trunk-2.3/debian/slapd.prerm
===================================================================
--- openldap/trunk-2.3/debian/slapd.prerm	2006-04-20 23:46:12 UTC (rev 637)
+++ openldap/trunk-2.3/debian/slapd.prerm	2006-05-06 09:37:43 UTC (rev 638)
@@ -2,6 +2,8 @@
 
 set -e
 
+. /usr/share/debconf/confmodule
+
 # Work around bug introduced in 2.1.x, fixed in 2.1.22-2      		{{{
 
 # The slapd 2.1.x packages before 2.1.17-3 had a problem in the init.d
@@ -58,6 +60,10 @@
 fi
 # }}}
 
+# Set seen flag of this question to false to get it asked if someone disagrees
+# with the upgrade from ldbm to bdb backend.
+db_fset slapd/migrate_ldbm_to_bdb seen false
+
 #DEBHELPER#
 
 exit 0

Modified: openldap/trunk-2.3/debian/slapd.scripts-common
===================================================================
--- openldap/trunk-2.3/debian/slapd.scripts-common	2006-04-20 23:46:12 UTC (rev 637)
+++ openldap/trunk-2.3/debian/slapd.scripts-common	2006-05-06 09:37:43 UTC (rev 638)
@@ -20,6 +20,11 @@
 # Ask the user for the configuration of the dumping component
 # Usage: configure_dumping
 
+  # Look if the user wants to migrate to the BDB backend
+  if ! database_dumping_enabled; then
+    return 0
+  fi
+
 	# Configure if and where to dump the LDAP databases
 	db_input medium slapd/dump_database || true
 	db_go || true
@@ -58,20 +63,6 @@
 	fi
 }
 # }}}
-break_on_ldbm_to_bdb_migration_disagree() { # {{{
-  if [ -e "$SLAPD_CONF" ] && grep -qE \
-      -e '^moduleload[[:space:]]+back_ldbm' \
-      -e '^(database|backend)[[:space:]]+ldbm' \
-      "$SLAPD_CONF"; then
-    db_get slapd/migrate_ldbm_to_bdb
-    if [ "$RET" = "false" ]; then
-      db_fset slapd/migrate_ldbm_to_bdb seen false
-      return 1
-    fi
-    return 0
-  fi
-  return 0
-} # }}}
 database_dumping_enabled() {						# {{{
 # Check if the user has enabled database dumping for the current situation.
 # Return success if yes.
@@ -263,7 +254,7 @@
 		fi
 		echo "done." >&2
 
-		if [ -n "$SLAPD_USER" -o -n "$SLAPD_GROUP" ]; then
+		if [ -n "$SLAPD_USER" ] || [ -n "$SLAPD_GROUP" ]; then
 			echo -n "  - chowning database directory ($SLAPD_USER:$SLAPD_GROUP)... "
 			[ -z "$SLAPD_USER" ] || \
 				chown -R "$SLAPD_USER" "$dbdir"
@@ -1078,7 +1069,7 @@
 # our scripts.
 # Usage: if supported_backend "backend"; then ... fi
 
-	case "$1" in bdb|hdb) return 0; esac
+	case "$1" in ldbm|bdb|hdb) return 0; esac
 	return 1
 }
 




More information about the Pkg-openldap-devel mailing list