[Pkg-openldap-devel] [openldap] 11/29: r1554 at pulsar: torsten | 2005-03-22 12:33:08 +0100 Cleanups and docs

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

commit 5e5c11ede68dc53b95bbd5a684767bca9e754b99
Author: Torsten Landschoff <torsten at debian.org>
Date:   Thu Mar 24 23:13:14 2005 +0000

     r1554 at pulsar:  torsten | 2005-03-22 12:33:08 +0100
     Cleanups and docs
---
 debian/slapd.preinst |   39 ++++++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 13 deletions(-)

diff --git a/debian/slapd.preinst b/debian/slapd.preinst
index 3d47a93..20f9285 100755
--- a/debian/slapd.preinst
+++ b/debian/slapd.preinst
@@ -2,6 +2,7 @@
 
 set -e
 
+# Use debconf if it is available
 if [ -e "/usr/share/debconf/confmodule" ]; then
 	. /usr/share/debconf/confmodule || true
 fi
@@ -10,22 +11,32 @@ fi
 # various helper functions and $OLD_VERSION and $SLAPD_CONF
 #SCRIPTSCOMMON#
 
+stop_slapd() {								# {{{
 # Make sure slapd is shut down before mucking with the db files
-# and whatnot...  Use this function
-stop_slapd() {
-  # Find out the name of slapd's pid file
-  if [ -z "$SLAPD_PIDFILE" ] && [ -f "$SLAPD_CONF" ]; then
-    SLAPD_PIDFILE=`read_slapd_conf < $SLAPD_CONF | sed -ne 's/^pidfile[[:space:]]\+\(.\+\)/\1/p'`
-  fi
-
-  # Use the pidfile if it is there, if not then just do without
-  if [ -z "$SLAPD_PIDFILE" ]; then
-    start-stop-daemon --stop --retry 10 --quiet --oknodo --exec /usr/sbin/slapd >/dev/null 2>&1
-  else
-    start-stop-daemon --stop --retry 10 --quiet --oknodo --pidfile "$SLAPD_PIDFILE" >/dev/null 2>&1
-  fi
+# and whatnot...
+# Usage: stop_slapd
+# XXX: Why are we stopping slapd manually? That should be done via 
+# the init.d script and invoke-rc.d. Leaving this alone for now 
+# -- Torsten
+
+	# Find out the name of slapd's pid file
+  	if [ -z "$SLAPD_PIDFILE" ] && [ -f "$SLAPD_CONF" ]; then
+    		SLAPD_PIDFILE=`read_slapd_conf < $SLAPD_CONF \
+			| sed -ne 's/^pidfile[[:space:]]\+\(.\+\)/\1/p'`
+  	fi
+
+	# Use the pidfile if it is there, if not then just do without
+  	if [ -z "$SLAPD_PIDFILE" ]; then
+    		start-stop-daemon --stop --retry 10 --quiet --oknodo \
+			--exec /usr/sbin/slapd >&2
+  	else
+    		start-stop-daemon --stop --retry 10 --quiet --oknodo \
+			--pidfile "$SLAPD_PIDFILE" >&2
+	fi
 }
 
+# }}}
+
 # If we are upgrading from an old version then stop slapd and attempt to
 # slapcat out the data so we can use it in postinst to do the upgrade
 
@@ -33,3 +44,5 @@ if [ "$MODE" = upgrade ]; then
 	stop_slapd
 	dump_databases
 fi
+
+# vim: set sw=8 foldmethod=marker: 

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