From owner-freebsd-rc@FreeBSD.ORG Wed Dec 28 02:02:03 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C10BF16A41F for ; Wed, 28 Dec 2005 02:02:03 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id E8AFF43D53 for ; Wed, 28 Dec 2005 02:02:02 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 37780 invoked by uid 399); 28 Dec 2005 02:02:02 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 28 Dec 2005 02:02:02 -0000 Message-ID: <43B1F218.2080408@FreeBSD.org> Date: Tue, 27 Dec 2005 18:02:00 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051226) MIME-Version: 1.0 To: Florent Thoumie References: <1134927080.744.14.camel@cream.xbsd.org> In-Reply-To: <1134927080.744.14.camel@cream.xbsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: rc.d/ldconfig change X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2005 02:02:03 -0000 Florent Thoumie wrote: > Since we have some ports that want to ldconfig directories early > in the boot process (actually, early in localpkg sequence), I > think it would be a good idee to support > ${PREFIX}/etc/ld.so.conf.d/ directories (or whatever the name). I'd rather keep it out of etc/ for fear that users might think it's a knob they can twiddle. I would suggest PREFIX/libdata (note, pkgconfig stuff is already there, so this may not be the best choice, but it fits with precedent). Whatever name you choose, it will need an entry in /etc/mtree/BSD.local.dist. > Here's what I was thinking about (see attached patch). > > This way, I can imagine a USE_LDCONFIG variable containing > directories and bsd.port.mk would just : > > .if defined(USE_LDCONFIG) > echo ${USE_LDCONFIG} > ${PREFIX}/etc/ld.so.conf.d/${UNIQUENAME} > .endif I would use touch here, but I won't quibble. > [...] instead of installing 000.${UNIQUENAME}.sh in > ${PREFIX}/etc/rc.d. > > I guess it should be ok since /etc/rc.d/ldconfig is launched > after /etc/rc.d/mountcritremote. We can assume that local > directories will be available (by default local_ldconfig=""). > > Note: That's a simple patch to src/etc/rc.d/ldconfig, I'll work > on a more polished one (with updated configuration). > > > > ------------------------------------------------------------------------ > > Index: rc.d/ldconfig > =================================================================== > RCS file: /home/ncvs/src/etc/rc.d/ldconfig,v > retrieving revision 1.14 > diff -u -r1.14 ldconfig > --- rc.d/ldconfig 16 Jan 2005 08:34:30 -0000 1.14 > +++ rc.d/ldconfig 18 Dec 2005 17:18:28 -0000 > @@ -22,6 +22,11 @@ > checkyesno ldconfig_insecure && _ins="-i" > if [ -x "${ldconfig_command}" ]; then > _LDC="/lib /usr/lib" > + for i in ${local_ldconfig}; do Please make the variable name ldconfig_local_d (or _dir if you prefer, just try to keep it short), as the convention is that all variables relative to a given rc.d script need to start with the name of the script. I assume from what you wrote above that you are going to do the /etc/defaults/rc.conf and rc.conf(5) updates as well? Thanks for this creative thinking, I think that this change will go a long way towards making things easier for our users. Doug -- This .signature sanitized for your protection