[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rc.d/ldconfig change
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).
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
[...] 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).
--
Florent Thoumie
flz@xxxxxxxxxxx
FreeBSD committer
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
+ if [ -d "${i}" ]; then
+ ldconfig_paths="${ldconfig_paths} `ls ${i}`"
+ fi
+ done
for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
if [ -r "${i}" ]; then
_LDC="${_LDC} ${i}"
Attachment:
signature.asc
Description: This is a digitally signed message part