Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2012 13:50:09 GMT
From:      Oliver Hartmann <ohartman@zedat.fu-berlin.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/166492: net/openldap24-server: rc.d-srcipt not applicable to TMPFS driven /var/run
Message-ID:  <201203291350.q2TDo9ns022349@red.freebsd.org>
Resent-Message-ID: <201203291400.q2TE0JUS013881@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166492
>Category:       ports
>Synopsis:       net/openldap24-server: rc.d-srcipt not applicable to TMPFS driven /var/run
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 29 14:00:19 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Hartmann
>Release:        FreeBSD 10.0-CURRENT
>Organization:
FU Berlin
>Environment:
>Description:
Using OpenLDAP server in combination with TMPFS-backed up /var/run folder fails starting the OpenLDAP server since the folder /var/run/openldap needs to be created at the start time of the OpenLDAP server slapd.

By adding a simple check to the rc.d-start script /usr/local/etc/rc.d/slapd like a check done by "dbus" or "hald" circumvents this problem.
>How-To-Repeat:

>Fix:
Apply attached patch.

Patch attached with submission follows:

--- slapd.orig	2012-03-29 14:27:17.000000000 +0200
+++ slapd	2012-03-29 15:38:09.000000000 +0200
@@ -54,6 +54,11 @@
 command="/usr/local/libexec/slapd"
 pidfile="/var/run/openldap/slapd.pid"
 
+# Ensure existence of folder /var/run/openldap
+if [ ! -d  $(dirname $pidfile) ]; then
+	mkdir	-p $(dirname $pidfile)
+fi
+
 # set required_dirs, required_files and DATABASEDIR
 if checkyesno slapd_cn_config; then
   required_dirs="/usr/local/etc/openldap/slapd.d"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203291350.q2TDo9ns022349>