[Pkg-openldap-devel] [openldap] 10/17: r1303 at pulsar: torsten | 2005-03-09 14:33:29 +0100 * debian/slapd.postinst: Make slapadd more noisy, writing the new directory to stderr if something goes wrong (should help for bug #236097). -- Torsten Landschoff <torsten at debian.org> Wed, 9 Mar 2005 14:21:38 +0100
Timo Aaltonen
tjaalton-guest at alioth.debian.org
Thu Oct 10 05:34:37 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-0.pre5
in repository openldap.
commit 38bfc1f24a909788c673bf51174af462d897e036
Author: Torsten Landschoff <torsten at debian.org>
Date: Wed Mar 9 13:40:12 2005 +0000
r1303 at pulsar: torsten | 2005-03-09 14:33:29 +0100
* debian/slapd.postinst: Make slapadd more noisy, writing the new
directory to stderr if something goes wrong (should help for
bug #236097).
-- Torsten Landschoff <torsten at debian.org> Wed, 9 Mar 2005 14:21:38 +0100
---
debian/changelog | 5 ++++-
debian/slapd.postinst | 17 ++++++++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index bb32eb6..332880f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,11 @@ openldap2.2 (2.2.23-0.pre5) experimental; urgency=low
* Apply NTLM patch from ximian-connector source package.
* debian/slapd.postinst: Fix small typo leading to upgrade failures.
Added some notes while wading through maintainer scripts.
+ * debian/slapd.postinst: Make slapadd more noisy, writing the new
+ directory to stderr if something goes wrong (should help for
+ bug #236097).
- --
+ -- Torsten Landschoff <torsten at debian.org> Wed, 9 Mar 2005 14:21:38 +0100
openldap2.2 (2.2.23-0.pre4) experimental; urgency=low
diff --git a/debian/slapd.postinst b/debian/slapd.postinst
index 908c542..d528214 100644
--- a/debian/slapd.postinst
+++ b/debian/slapd.postinst
@@ -130,6 +130,21 @@ create_new_slapd_conf() { # {{{
echo "done" >&2
}
# }}}
+noisy_slapadd() { # {{{
+# Run slapadd and output the ldif file if something goes wrong.
+# Usage: noisy_slapadd [options] < ldif-file
+ local ldif_tmp
+
+ ldif_tmp=`mktemp -t slapadd.XXXXXX`
+ cat > "$ldif_tmp"
+ if ! slapadd "$@" < "$ldif_tmp"; then
+ echo >&2 "Failed to slapadd this data: "
+ cat >&2 < "$ldif_tmp"
+ rm "$ldif_tmp"
+ exit 1
+ fi
+ rm "$ldif_tmp"
+} # }}}
create_new_directory() { # {{{
# Create a new directory. Takes the basedn and the dc value of that entry.
# Other information is extracted from debconf.
@@ -147,7 +162,7 @@ create_new_directory() { # {{{
echo -n " Creating initial LDAP directory... " >&2
touch /var/lib/slapd/suffix_change
- cat <<-EOF | slapadd
+ cat <<-EOF | noisy_slapadd
dn: $basedn
objectClass: top
objectClass: dcObject
--
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