From nobody@FreeBSD.org  Mon Sep  7 19:19:36 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EC266106568D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 Sep 2009 19:19:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DAD5D8FC41
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 Sep 2009 19:19:36 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n87JJarx018986
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 7 Sep 2009 19:19:36 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n87JJaN1018984;
	Mon, 7 Sep 2009 19:19:36 GMT
	(envelope-from nobody)
Message-Id: <200909071919.n87JJaN1018984@www.freebsd.org>
Date: Mon, 7 Sep 2009 19:19:36 GMT
From: Alexander Wittig <alexander@wittig.name>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [net/openldap24-server] slapd startup script creates wrong files due to missing "/" after %%PREFIX%%
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         138618
>Category:       ports
>Synopsis:       [net/openldap24-server] slapd startup script creates wrong files due to missing "/" after %%PREFIX%%
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 07 19:20:04 UTC 2009
>Closed-Date:    Mon Sep 07 22:27:36 UTC 2009
>Last-Modified:  Mon Sep  7 22:30:01 UTC 2009
>Originator:     Alexander Wittig
>Release:        7.2 Stable
>Organization:
>Environment:
FreeBSD hotzenplotz.wittig.name 7.2-STABLE FreeBSD 7.2-STABLE #0: Tue Jun 16 00:32:35 CEST 2009     root@hotzenplotz.wittig.name:/usr/obj/usr/src/sys/ALEX  amd64

>Description:
With slapd_cn_config off (the default), the slapd rc.d script tries to detect the database directories from the configuration file. Unfortunately, there is a "/" missing after %%PREFIX%% in this line:

DATABASEDIR=`awk '$1 == "directory" { print $2 }' "%%PREFIX%%etc/openldap/slapd.conf" 2>&1 /dev/null`

This causes awk to fail and output an error message which in turn causes every word in that error message to be treated as a database directory (i.e. being created).
>How-To-Repeat:
Run "/usr/local/etc/rc.d/slapd start" on a system without slapd_cn_config set (or set to off).
>Fix:
change the above line in files/slapd.sh.in to 

DATABASEDIR=`awk '$1 == "directory" { print $2 }' "%%PREFIX%%/etc/openldap/slapd.conf" 2>&1 /dev/null`

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->delphij 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Sep 7 19:20:15 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138618 
State-Changed-From-To: open->closed 
State-Changed-By: delphij 
State-Changed-When: Mon Sep 7 22:27:22 UTC 2009 
State-Changed-Why:  
Patch applied, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138618 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/138618: commit references a PR
Date: Mon,  7 Sep 2009 22:27:26 +0000 (UTC)

 delphij     2009-09-07 22:27:13 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/openldap24-server Makefile 
     net/openldap24-server/files slapd.sh.in 
   Log:
   Add a missing / or otherwise the generated script would point to wrong
   directory.
   
   PR:             ports/138618
   Reported by:    Alexander Wittig <alexander wittig name>
   
   Revision  Changes    Path
   1.172     +1 -1      ports/net/openldap24-server/Makefile
   1.11      +2 -2      ports/net/openldap24-server/files/slapd.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
