Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2005 18:02:00 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        Florent Thoumie <flz@xbsd.org>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: rc.d/ldconfig change
Message-ID:  <43B1F218.2080408@FreeBSD.org>
In-Reply-To: <1134927080.744.14.camel@cream.xbsd.org>
References:  <1134927080.744.14.camel@cream.xbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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