[Pkg-openldap-devel] [openldap] 06/11: r2059 at pulsar: torsten | 2005-05-23 17:02:58 +0200 * debian/slapd.postinst: Make sure the debhelper commands are executed in all cases (closes: #310422).

Timo Aaltonen tjaalton-guest at alioth.debian.org
Thu Oct 10 05:36:12 UTC 2013


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

tjaalton-guest pushed a commit to annotated tag 2.2.23-6
in repository openldap.

commit 0e1ae89ef685fa43596822375f1f1c4434998aaf
Author: Torsten Landschoff <torsten at debian.org>
Date:   Mon May 23 15:00:34 2005 +0000

     r2059 at pulsar:  torsten | 2005-05-23 17:02:58 +0200
      * debian/slapd.postinst: Make sure the debhelper commands are executed
        in all cases (closes: #310422).
---
 debian/changelog      |    2 ++
 debian/slapd.postinst |   51 +++++++++++++++++++++++++++----------------------
 2 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2b78fea..8e81a69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ openldap2.2 (2.2.23-6) unstable; urgency=low
     the database dumping directory use the default value. Seems like the
     readline interface does not care about the default value 
     (closes: #308234).
+  * debian/slapd.postinst: Make sure the debhelper commands are executed 
+    in all cases (closes: #310422).
 
   Steve Langasek <vorlon at debian.org>:
   * libraries/libldap_r/Makefile.in: make sure the ximian-connector ntlm
diff --git a/debian/slapd.postinst b/debian/slapd.postinst
index 198a9f6..c8036d5 100644
--- a/debian/slapd.postinst
+++ b/debian/slapd.postinst
@@ -4,46 +4,51 @@ set -e
 
 . /usr/share/debconf/confmodule
 
-# TODO:
-# - capture slapadd, slapcat output so it does not overwrite the progress
-#   display
-
 # This will be replaced with debian/slapd.scripts-common which includes
 # various helper functions and $OLD_VERSION and $SLAPD_CONF
 #SCRIPTSCOMMON#
 
-# Initial configuration							{{{
+postinst_initial_configuration() {					# {{{
+# Configure slapd for the first time (when first installed)
+# Usage: postinst_initial_configuration
 
-if is_initial_configuration "$@"; then
 	if manual_configuration_wanted; then
 		echo "  Omitting slapd configuration as requested." >&2
 	else
 		create_new_configuration
 		configure_v2_protocol_support
 	fi
-	exit
-fi
+}
 
 # }}}
-# Update configuration files for new features				{{{
+postinst_upgrade_configuration() {					# {{{
+# Handle upgrading slapd from some older version
+# Usage: postinst_upgrade_configuration
+
+	# Better back up the config file in any case
+	echo -n "  Backing up $SLAPD_CONF in `database_dumping_destdir`... " >&2
+	backup_config_once
+	echo done. >&2
+
+	configure_v2_protocol_support
+	if previous_version_older 2.1; then
+		autoconfigure_modules
+	fi
+	update_access_config_directives
 
-# Better back up the config file in any case
-echo -n "  Backing up $SLAPD_CONF in `database_dumping_destdir`... " >&2
-backup_config_once
-echo done. >&2
+	if database_format_changed; then
+		# During upgrading we have to load the old data
+		move_incompatible_databases_away
+		load_databases
+	fi
+}
 
-configure_v2_protocol_support
-if previous_version_older 2.1; then
-	autoconfigure_modules
-fi
-update_access_config_directives
 # }}}
 
-
-if database_format_changed; then
-	# During upgrading we have to load the old data
-	move_incompatible_databases_away
-	load_databases
+if is_initial_configuration "$@"; then
+	postinst_initial_configuration
+else
+	postinst_upgrade_configuration
 fi
 
 db_stop || true

-- 
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