[Pkg-openldap-devel] r830 - openldap/trunk-2.3/debian

Russ Allbery rra at alioth.debian.org
Sat Jun 2 06:44:00 UTC 2007


Author: rra
Date: 2007-06-02 06:43:59 +0000 (Sat, 02 Jun 2007)
New Revision: 830

Modified:
   openldap/trunk-2.3/debian/changelog
   openldap/trunk-2.3/debian/slapd.init
Log:
* Use variables in /etc/init.d/slapd for the paths to slapd and slurpd
  so that someone who really wants to can override them in
  /etc/default/slapd.  (Closes: #403948)

Modified: openldap/trunk-2.3/debian/changelog
===================================================================
--- openldap/trunk-2.3/debian/changelog	2007-06-02 06:43:25 UTC (rev 829)
+++ openldap/trunk-2.3/debian/changelog	2007-06-02 06:43:59 UTC (rev 830)
@@ -19,6 +19,9 @@
     robustness when debconf is running.  (Closes: #227482)
   * Add to /etc/default/slapd a commented-out example of how to change the
     keytab file used for GSSAPI authentication.  (Closes: #412017)
+  * Use variables in /etc/init.d/slapd for the paths to slapd and slurpd
+    so that someone who really wants to can override them in
+    /etc/default/slapd.  (Closes: #403948)
 
  -- Russ Allbery <rra at debian.org>  Fri, 01 Jun 2007 23:41:10 -0700
 

Modified: openldap/trunk-2.3/debian/slapd.init
===================================================================
--- openldap/trunk-2.3/debian/slapd.init	2007-06-02 06:43:25 UTC (rev 829)
+++ openldap/trunk-2.3/debian/slapd.init	2007-06-02 06:43:59 UTC (rev 830)
@@ -14,8 +14,13 @@
 # Kill me on all errors
 set -e
 
+# Set the paths to slapd and slurpd as variables so that someone who really
+# wants to can override the paths in /etc/default/slapd.
+SLAPD=/usr/sbin/slapd
+SLURPD=/usr/sbin/slurpd
+
 # Stop processing if slapd is not there
-[ -x /usr/sbin/slapd ] || exit 0
+[ -x $SLAPD ] || exit 0
 
 # debconf may have this file descriptor open and it makes things work a bit
 # more reliably if we redirect it as a matter of course.  db_stop will take
@@ -137,11 +142,11 @@
 	if [ -z "$SLAPD_SERVICES" ]; then
 		reason="`start-stop-daemon --start --quiet --oknodo \
 			--pidfile "$SLAPD_PIDFILE" \
-			--exec /usr/sbin/slapd -- $SLAPD_OPTIONS 2>&1`"
+			--exec $SLAPD -- $SLAPD_OPTIONS 2>&1`"
 	else
 		reason="`start-stop-daemon --start --quiet --oknodo \
 			--pidfile "$SLAPD_PIDFILE" \
-			--exec /usr/sbin/slapd -- -h "$SLAPD_SERVICES" $SLAPD_OPTIONS 2>&1`"
+			--exec $SLAPD -- -h "$SLAPD_SERVICES" $SLAPD_OPTIONS 2>&1`"
 	fi
 
 	# Backward compatibility with OpenLDAP 2.1 client libraries.
@@ -158,7 +163,7 @@
 	fi
 	echo -n " slurpd"
 	reason="`start-stop-daemon --start --quiet --oknodo \
-		--exec /usr/sbin/slurpd -- $SLURPD_OPTIONS 2>&1`"
+		--exec $SLURPD -- $SLURPD_OPTIONS 2>&1`"
 }
 
 # Stop the slapd daemon and capture the error message (if any) to
@@ -167,7 +172,7 @@
 	echo -n " slapd"
 	reason="`start-stop-daemon --stop --quiet --oknodo --retry 10 \
 		--pidfile "$SLAPD_PIDFILE" \
-		--exec /usr/sbin/slapd 2>&1`"
+		--exec $SLAPD 2>&1`"
 }
 
 # Stop the slurpd daemon and capture the error message (if any) to
@@ -178,7 +183,7 @@
 	fi
 	echo -n " slurpd"
 	reason="`start-stop-daemon --stop --quiet --oknodo --retry 10 \
-		--exec /usr/sbin/slurpd 2>&1`"
+		--exec $SLURPD 2>&1`"
 }
 
 # Start the OpenLDAP daemons




More information about the Pkg-openldap-devel mailing list