[Pkg-openldap-devel] r1305 - in openldap/trunk/debian: . patches
matthijs at alioth.debian.org
matthijs at alioth.debian.org
Wed Aug 18 19:41:11 UTC 2010
Author: matthijs
Date: 2010-08-18 19:41:10 +0000 (Wed, 18 Aug 2010)
New Revision: 1305
Modified:
openldap/trunk/debian/patches/service-operational-before-detach
openldap/trunk/debian/slapd.default
openldap/trunk/debian/slapd.scripts-common
Log:
* Fix the patch service-operational-before-detach, the pidfile was written
before the detach so we had a wrong pid in this file. Moving pidfile writing
after the detach.
* Update the defaults in slapd.default to have directly slapd.d available.
* Fix the upgrade procedure with the new slapd.defaults file.
Modified: openldap/trunk/debian/patches/service-operational-before-detach
===================================================================
--- openldap/trunk/debian/patches/service-operational-before-detach 2010-08-17 20:01:53 UTC (rev 1304)
+++ openldap/trunk/debian/patches/service-operational-before-detach 2010-08-18 19:41:10 UTC (rev 1305)
@@ -2,7 +2,7 @@
===================================================================
--- a/servers/slapd/main.c
+++ b/servers/slapd/main.c
-@@ -880,10 +880,6 @@
+@@ -880,14 +880,28 @@
(void) SIGNAL( SIGBREAK, slap_sig_shutdown );
#endif
@@ -13,14 +13,46 @@
#ifdef CSRIMALLOC
mal_leaktrace(1);
#endif
-@@ -950,6 +946,10 @@
- goto shutdown;
- }
++ /*
++ * FIXME: moved here from slapd_daemon_task()
++ * because back-monitor db_open() needs it
++ */
++ time( &starttime );
++
++ connections_init();
++
++ if ( slap_startup( NULL ) != 0 ) {
++ rc = 1;
++ SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 21 );
++ goto shutdown;
++ }
++
+#ifndef HAVE_WINSOCK
+ lutil_detach( no_detach, 0 );
+#endif /* HAVE_WINSOCK */
+
+ if ( slapd_pid_file != NULL ) {
+ FILE *fp = fopen( slapd_pid_file, "w" );
+
+@@ -936,20 +950,6 @@
+ slapd_args_file_unlink = 1;
+ }
+
+- /*
+- * FIXME: moved here from slapd_daemon_task()
+- * because back-monitor db_open() needs it
+- */
+- time( &starttime );
+-
+- connections_init();
+-
+- if ( slap_startup( NULL ) != 0 ) {
+- rc = 1;
+- SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 21 );
+- goto shutdown;
+- }
+-
Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 );
#ifdef HAVE_NT_EVENT_LOG
Modified: openldap/trunk/debian/slapd.default
===================================================================
--- openldap/trunk/debian/slapd.default 2010-08-17 20:01:53 UTC (rev 1304)
+++ openldap/trunk/debian/slapd.default 2010-08-18 19:41:10 UTC (rev 1305)
@@ -2,7 +2,7 @@
# default (/etc/ldap/slapd.conf). If using the cn=config backend to store
# configuration in LDIF, set this variable to the directory containing the
# cn=config data.
-SLAPD_CONF=
+SLAPD_CONF="/etc/ldap/slapd.d"
# System account to run the slapd server under. If empty the server
# will run as root.
Modified: openldap/trunk/debian/slapd.scripts-common
===================================================================
--- openldap/trunk/debian/slapd.scripts-common 2010-08-17 20:01:53 UTC (rev 1304)
+++ openldap/trunk/debian/slapd.scripts-common 2010-08-18 19:41:10 UTC (rev 1305)
@@ -755,14 +755,12 @@
fi
# Load the default location of the slapd config file
-if [ -z "$SLAPD_CONF" ]; then
+if [ "${MODE}" = "configure" ] || [ -z "$SLAPD_CONF" ]; then
if previous_version_older 2.4.23-3 && \
[ -f "/etc/ldap/slapd.conf" ] && \
[ ! -e "/etc/ldap/slapd.d" ]; then
SLAPD_CONF="/etc/ldap/slapd.conf"
- else
- SLAPD_CONF="/etc/ldap/slapd.d"
fi
fi
More information about the Pkg-openldap-devel
mailing list