From and@moon.cc.rsu.ru  Wed Oct 29 04:54:20 2003
Return-Path: <and@moon.cc.rsu.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C4D8616A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Oct 2003 04:54:20 -0800 (PST)
Received: from moon.cc.rsu.ru (moon.cc.rsu.ru [195.208.252.124])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 71E8843F85
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Oct 2003 04:54:19 -0800 (PST)
	(envelope-from and@moon.cc.rsu.ru)
Received: from moon.cc.rsu.ru (localhost [127.0.0.1])
	by moon.cc.rsu.ru (8.12.9/8.12.9) with ESMTP id h9TCsGHm051893;
	Wed, 29 Oct 2003 15:54:16 +0300 (MSK)
	(envelope-from and@moon.cc.rsu.ru)
Received: (from and@localhost)
	by moon.cc.rsu.ru (8.12.9/8.12.9/Submit) id h9TCsFW9051892;
	Wed, 29 Oct 2003 15:54:15 +0300 (MSK)
Message-Id: <200310291254.h9TCsFW9051892@moon.cc.rsu.ru>
Date: Wed, 29 Oct 2003 15:54:15 +0300 (MSK)
From: Andrey Beresovsky <and@rsu.ru>
Reply-To: Andrey Beresovsky <and@rsu.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: os@rsu.ru
Subject: [PATCH] RCNG: shouldn't ldconfig be started before SERVERS?
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58680
>Category:       conf
>Synopsis:       [PATCH] RCNG: shouldn't ldconfig be started before SERVERS?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 29 05:00:35 PST 2003
>Closed-Date:    Tue Nov 22 20:58:20 GMT 2005
>Last-Modified:  Tue Nov 22 20:58:20 GMT 2005
>Originator:     Andrey Beresovsky
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Rostov State University
>Environment:
System: FreeBSD 5.1-CURRENT #0: Tue Oct 14 00:39:27 MSD 2003 i386


	
>Description:
I'd like to start/stop named (bind9 from ports) using RCNG with following flags:
named_enable="YES"
named_program="/usr/local/sbin/named"

When I use it manualy (/etc/rc.d/named start|stop|status) it works ok. But 
during system startup it fails because named binary depends on 
/usr/local/lib/libcrypto.so (openssl installed from ports) and rtld can't find
it since ldconfig wasn't ran yet.

I suggest running ldconfig before SERVERS (currently it is being ran before DAEMON)

If this is not "the right thing" then we should find appropriate solution for this problem.

>How-To-Repeat:
1. Build world with NO_OPENSSL and NO_BIND.
2. Install dns/bind9 and security/openssl from ports.
3. Write the following to /etc/rc.conf:
named_enable="YES"
named_program="/usr/local/sbin/named"
4. Reboot.

>Fix:
--- ldconfig    Mon Oct 13 23:35:02 2003
+++ ldconfig.patched    Wed Oct 29 15:41:20 2003
@@ -6,7 +6,7 @@

 # PROVIDE: ldconfig
 # REQUIRE: mountall mountcritremote
-# BEFORE:  DAEMON
+# BEFORE:  SERVERS
 # KEYWORD: FreeBSD NetBSD

 . /etc/rc.subr
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: kris 
Responsible-Changed-When: Thu Oct 30 01:15:01 PST 2003 
Responsible-Changed-Why:  
Assign to rc.d developer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58680 
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Tue Nov 22 20:56:56 GMT 2005 
State-Changed-Why:  

I'm doing exactly what the PR states is not possible 
(starting /usr/local/sbin/named), so I assume this 
has fixed itself. 

Please feel free to open a new PR if that is not the case. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58680 
>Unformatted:
