rc.d/ldconfig change
Florent Thoumie
flz at xbsd.org
Tue Dec 27 18:10:50 PST 2005
On Wednesday 28 December 2005 03:02, Doug Barton wrote:
> 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.
I don't much care about where it's stored, I figured out that etc/ was a good
candidate because /etc/ had already ld.so.conf but libdata is fine with me.
Note that I modified BSD.local.dist in latest version of the patch.
> > 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.
Not sure how you could do the same thing with only touch.
> > [...] 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?
Already done in the latest version of the patch, but these changes are ok for
me. Since it's going to be set by default to a sensible value, I guess the
name doesn't matter.
> Thanks for this creative thinking, I think that this change will go a long
> way towards making things easier for our users.
That's the point ;)
--
Florent Thoumie
flz at FreeBSD.org
FreeBSD Committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20051228/c420f670/attachment.bin
More information about the freebsd-rc
mailing list