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

Russ Allbery rra at alioth.debian.org
Sun Jun 3 07:27:58 UTC 2007


Author: rra
Date: 2007-06-03 07:27:57 +0000 (Sun, 03 Jun 2007)
New Revision: 836

Modified:
   openldap/trunk-2.3/debian/changelog
   openldap/trunk-2.3/debian/slapd.default
   openldap/trunk-2.3/debian/slapd.init
Log:
* Add options to /etc/default/slapd to let the system administrator tell
  the init script to not start slapd on boot.  (Closes: #254999)

Modified: openldap/trunk-2.3/debian/changelog
===================================================================
--- openldap/trunk-2.3/debian/changelog	2007-06-03 06:13:08 UTC (rev 835)
+++ openldap/trunk-2.3/debian/changelog	2007-06-03 07:27:57 UTC (rev 836)
@@ -19,6 +19,8 @@
     detects changes itself and does the right thing.  Also note in
     README.DB_CONFIG the existence of the dbconfig slapd.conf parameter
     and slapd's DB_CONFIG writing support.  (Closes: #412575)
+  * Add options to /etc/default/slapd to let the system administrator tell
+    the init script to not start slapd on boot.  (Closes: #254999)
   * Redirect fd 3 to /dev/null in the slapd init script for additional
     robustness when debconf is running.  (Closes: #227482)
   * Add to /etc/default/slapd a commented-out example of how to change the
@@ -33,7 +35,7 @@
   * Use binary:Version instead of Source-Version for the tight
     dependencies between slapd and ldap-utils and libldap-2.3-0.
 
- -- Russ Allbery <rra at debian.org>  Sat, 02 Jun 2007 22:35:13 -0700
+ -- Russ Allbery <rra at debian.org>  Sun, 03 Jun 2007 00:27:00 -0700
 
 openldap2.3 (2.3.35-1) unstable; urgency=low
 

Modified: openldap/trunk-2.3/debian/slapd.default
===================================================================
--- openldap/trunk-2.3/debian/slapd.default	2007-06-03 06:13:08 UTC (rev 835)
+++ openldap/trunk-2.3/debian/slapd.default	2007-06-03 07:27:57 UTC (rev 836)
@@ -1,4 +1,5 @@
-# Default location of the slapd.conf file
+# Default location of the slapd.conf file. If empty, use the compiled-in
+# default (/etc/ldap/slapd.conf).
 SLAPD_CONF=
 
 # System account to run the slapd server under. If empty the server
@@ -25,6 +26,19 @@
 # Example usage:
 # SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps:/// ldapi:///"
 
+# If SLAPD_NO_START is set, the init script will not start or restart
+# slapd or slurpd (but stop will still work).  Uncomment this if you are
+# starting slapd via some other means or if you don't want slapd normall
+# started at boot.
+#SLAPD_NO_START=1
+
+# If SLAPD_SENTINEL_FILE is set to path to a file and that file exists,
+# the init script will not start or restart slapd (but stop will still
+# work).  Use this for temporarily disabling startup of slapd (when doing
+# maintenance, for example, or through a configuration management system)
+# when you don't want to edit a configuration file.
+SLAPD_SENTINEL_FILE=/etc/ldap/noslapd
+
 # For Kerberos authentication (via SASL), slapd by default uses the system
 # keytab file (/etc/krb5.keytab).  To use a different keytab file,
 # uncomment this line and change the path.

Modified: openldap/trunk-2.3/debian/slapd.init
===================================================================
--- openldap/trunk-2.3/debian/slapd.init	2007-06-03 06:13:08 UTC (rev 835)
+++ openldap/trunk-2.3/debian/slapd.init	2007-06-03 07:27:57 UTC (rev 836)
@@ -96,6 +96,18 @@
 	SLAPD_OPTIONS="-g $SLAPD_GROUP $SLAPD_OPTIONS"
 fi
 
+# Check whether we were configured to not start the services.
+check_for_no_start() {
+	if [ -n "$SLAPD_NO_START" ]; then
+		echo 'Not starting slapd: SLAPD_NO_START set in /etc/default/slapd' >&2
+		exit 0
+	fi
+	if [ -n "$SLAPD_SENTINEL_FILE" ] && [ -e "$SLAPD_SENTINEL_FILE" ]; then
+		echo "Not starting slapd: $SLAPD_SENTINEL_FILE exists" >&2
+		exit 0
+	fi
+}
+
 # Tell the user that something went wrong and give some hints for
 # resolving the problem.
 report_failure() {
@@ -208,10 +220,12 @@
 
 case "$1" in
   start)
+	check_for_no_start
   	start ;;
   stop)
   	stop ;;
   restart|force-reload)
+	check_for_no_start
   	stop
 	start
 	;;




More information about the Pkg-openldap-devel mailing list