[Pkg-openldap-devel] [openldap] 04/07: r1647 at pulsar: torsten | 2005-04-01 18:50:30 +0200 * Test upgrade and installation revealed some bugs, mostly typos: + return in shell actually is "return $?", not "return 0" as I though + Referenced $src where $srcdir was meant. + Only load old directories on upgrade and not during initial installation. -- Torsten Landschoff <torsten at debian.org> Fri, 1 Apr 2005 18:50:21 +0200

Timo Aaltonen tjaalton-guest at alioth.debian.org
Thu Oct 10 05:35:01 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-1
in repository openldap.

commit 4d5bfa748efa1f24fc4a84be6c6b07dfbd870c81
Author: Torsten Landschoff <torsten at debian.org>
Date:   Fri Apr 1 16:47:00 2005 +0000

     r1647 at pulsar:  torsten | 2005-04-01 18:50:30 +0200
      * Test upgrade and installation revealed some bugs, mostly typos:
        + return in shell actually is "return $?", not "return 0" as I though
        + Referenced $src where $srcdir was meant.
        + Only load old directories on upgrade and not during initial
          installation.
     -- Torsten Landschoff <torsten at debian.org>  Fri,  1 Apr 2005 18:50:21 +0200
---
 debian/changelog            |    7 ++++++-
 debian/slapd.postinst       |   12 ++++++++----
 debian/slapd.scripts-common |    9 +++++----
 3 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 35a534d..b91825e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,13 @@ openldap2.2 (2.2.23-1) unstable; urgency=low
     scripts here to have it all in one place.
   * Another pass over the maintainer scripts to remove cruft and tidy up
     the code a bit. Fixed some bugs on the way.
+  * Test upgrade and installation revealed some bugs, mostly typos:
+    + return in shell actually is "return $?", not "return 0" as I though
+    + Referenced $src where $srcdir was meant.
+    + Only load old directories on upgrade and not during initial 
+      installation.
 
- -- Torsten Landschoff <torsten at debian.org>  Fri,  1 Apr 2005 17:41:36 +0200
+ -- Torsten Landschoff <torsten at debian.org>  Fri,  1 Apr 2005 18:50:21 +0200
 
 openldap2.2 (2.2.23-0.pre6) experimental; urgency=low
 
diff --git a/debian/slapd.postinst b/debian/slapd.postinst
index 5fd150e..8f3d066 100644
--- a/debian/slapd.postinst
+++ b/debian/slapd.postinst
@@ -2,6 +2,8 @@
 
 set -e
 
+. /usr/share/debconf/confmodule
+
 # TODO:
 # - capture slapadd, slapcat output so it does not overwrite the progress
 #   display
@@ -10,8 +12,6 @@ set -e
 # various helper functions and $OLD_VERSION and $SLAPD_CONF
 #SCRIPTSCOMMON#
 
-. /usr/share/debconf/confmodule
-
 # Initial configuration							{{{
 
 if is_initial_configuration "$@"; then
@@ -33,8 +33,12 @@ update_access_config_directives
 # }}}
 
 
-move_incompatible_databases_away
-load_databases
+# During upgrading we have to load the old data
+# XXX: The if condition is preliminary  -- Torsten
+if ! is_initial_configuration "$@"; then
+	move_incompatible_databases_away
+	load_databases
+fi
 
 db_stop || true
 
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index 92e9648..2bb2655 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -19,6 +19,7 @@
 configure_dumping() {							# {{{
 # In case we are upgrading from an older version we ask the user for the
 # configuration of the dumping component.
+# XXX: Rethink this checks...  -- Torsten
 # Usage: configure_dumping (from .config script)
 
 	# Make sure we are either upgrading the package or reconfiguring
@@ -28,7 +29,7 @@ configure_dumping() {							# {{{
 	elif [ "$MODE" = reconfigure ]; then
 		true
 	else
-		return
+		return 0
 	fi
 
 	# Configure if and where to dump the LDAP databases
@@ -95,7 +96,7 @@ dump_databases() {							# {{{
 	
 	local db suffix file dir failed
 
-	database_dumping_enabled || return
+	database_dumping_enabled || return 0
 
 	dir=`database_dumping_destdir`
 	mkdir -p -m 700 "$dir"
@@ -336,7 +337,7 @@ move_old_database_away() {						# {{{
 	suffix="$2"
 	
 	if is_empty_dir "$databasedir"; then
-		return
+		return 0
 	fi
 
     
@@ -381,7 +382,7 @@ copy_example_DB_CONFIG() {						# {{{
 
 	if ! [ -f "${directory}/DB_CONFIG" ] && [ -d "$directory" ]; then
 		if [ -r "$srcdir/DB_CONFIG" ]; then
-		 	cp $src/DB_CONFIG "${directory}/DB_CONFIG"
+		 	cp $srcdir/DB_CONFIG "${directory}/DB_CONFIG"
 		fi
 
 		if [ -r "$srcdir/DB_CONFIG.gz" ]; then

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