diff options
author | dougb <dougb@FreeBSD.org> | 2006-01-08 10:15:31 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2006-01-08 10:15:31 +0000 |
commit | 2bdeba9d87921218cb6722c0da1b74fe0bd119ac (patch) | |
tree | 5b32eb52c896d966f1bb237b4835bd3f29e1dda2 /etc/rc.d/ldconfig | |
parent | 6f27a53b6f2b9f17b4144b5da54af97bb6d66991 (diff) | |
download | FreeBSD-src-2bdeba9d87921218cb6722c0da1b74fe0bd119ac.zip FreeBSD-src-2bdeba9d87921218cb6722c0da1b74fe0bd119ac.tar.gz |
Add a mechanism to include files added by ports which contain
the names of directories to include in the base ldconfig script.
This will eliminate the need for each port to install its own
boot script which does nothing but ldocnfig a given directory.
This code was developed by flz (ports committer), discussed on
freebsd-rc@, and modified slightly by me.
Submitted by: flz
Reviewed by: brooks
Diffstat (limited to 'etc/rc.d/ldconfig')
-rwxr-xr-x | etc/rc.d/ldconfig | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/etc/rc.d/ldconfig b/etc/rc.d/ldconfig index 96de363..60a61e1 100755 --- a/etc/rc.d/ldconfig +++ b/etc/rc.d/ldconfig @@ -22,6 +22,11 @@ ldconfig_start() checkyesno ldconfig_insecure && _ins="-i" if [ -x "${ldconfig_command}" ]; then _LDC="/lib /usr/lib" + for i in ${ldconfig_local_dirs}; do + if [ -d "${i}" ]; then + ldconfig_paths="${ldconfig_paths} `find ${i} -type f`" + fi + done for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do if [ -r "${i}" ]; then _LDC="${_LDC} ${i}" @@ -30,6 +35,18 @@ ldconfig_start() echo 'ELF ldconfig path:' ${_LDC} ${ldconfig} -elf ${_ins} ${_LDC} + case `sysctl -n hw.machine_arch` in + amd64) + for i in ${ldconfig_local32_dirs}; do + if [ -d "${i}" ]; then + ldconfig32_paths="${ldconfig32_paths} `find ${i} -type f`" + fi + done + echo '32-bit compatibility ldconfig path:' ${ldconfig32_paths} + ${ldconfig} -32 -m ${_ins} ${ldconfig32_paths} + ;; + esac + # Legacy aout support for i386 only case `sysctl -n hw.machine_arch` in i386) |