[Pkg-openldap-devel] [openldap] 35/39: r1743 at pulsar: torsten | 2005-04-14 19:56:38 +0200 Fix another typo and stop writing senseless messages by earlier checking.

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

commit 292282b7ef52f1671e3b1855ef83b3450b3a7ba2
Author: Torsten Landschoff <torsten at debian.org>
Date:   Thu Apr 14 17:52:46 2005 +0000

     r1743 at pulsar:  torsten | 2005-04-14 19:56:38 +0200
     Fix another typo and stop writing senseless messages by earlier checking.
---
 debian/slapd.config         |    2 +-
 debian/slapd.scripts-common |   12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/debian/slapd.config b/debian/slapd.config
index e17cf75..2b90057 100644
--- a/debian/slapd.config
+++ b/debian/slapd.config
@@ -19,7 +19,7 @@ if is_initial_configuration "$@"; then
 fi
 
 # Configure the dumping component if we are upgrading some older version
-if [ "$1" == configure ] && [ -n "$2" ]; then
+if [ "$1" = configure ] && [ -n "$2" ]; then
 	configure_dumping
 fi
    
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index 73fe8c8..cc755f2 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -374,9 +374,9 @@ move_old_database_away() {						# {{{
 
 	local databasedir backupdir
 	databasedir="$1"
-	suffix="$2"
+	suffix="${2:-unknown}"
 	
-	if is_empty_dir "$databasedir"; then
+	if [ ! -e "$databasedir" ] || is_empty_dir "$databasedir"; then
 		return 0
 	fi
 
@@ -455,7 +455,10 @@ create_new_configuration() {						# {{{
 	#	invoke-rc.d slapd stop
 	#fi
 
-	move_old_database_away /var/lib/ldap
+	if [ -e "/var/lib/ldap" ] && ! is_empty_dir /var/lib/ldap; then
+		echo >&2 "  Moving old database directory to /var/backups:"
+		move_old_database_away /var/lib/ldap
+	fi
 	create_new_slapd_conf "$basedn" "$backend"
 	create_new_directory "$basedn" "$dc"
 	copy_example_DB_CONFIG /var/lib/ldap
@@ -518,7 +521,6 @@ create_new_directory() {						# {{{
 	adminpass="$RET"
  
 	echo -n "  Creating initial LDAP directory... " >&2
-	touch /var/lib/slapd/suffix_change
 
 	cat <<-EOF | noisy_slapadd
 		dn: $basedn
@@ -837,7 +839,7 @@ query_initial_config() {
     db_input low slapd/purge_database || true
     # XXX - should be done more general, but for now this should do
     # the trick
-    if [-e "/var/lib/ldap" ] && ! is_empty_dir /var/lib/ldap; then
+    if [ -e "/var/lib/ldap" ] && ! is_empty_dir /var/lib/ldap; then
       db_input low slapd/move_old_database || true
     fi
     db_go || 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