13 desc="Configure the shared library cache"
14 ldconfig_command="/sbin/ldconfig"
15 start_cmd="ldconfig_start"
23 ldconfig=${ldconfig_command}
24 checkyesno ldconfig_insecure && _ins="-i"
25 if [ -x "${ldconfig_command}" ]; then
27 for i in ${ldconfig_local_dirs}; do
28 if [ -d "${i}" ]; then
29 _files=`find ${i} -type f`
30 if [ -n "${_files}" ]; then
31 ldconfig_paths="${ldconfig_paths} `cat ${_files} | sort -u`"
35 for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
36 if [ -r "${i}" ]; then
40 check_startmsgs && echo 'ELF ldconfig path:' ${_LDC}
41 ${ldconfig} -elf ${_ins} ${_LDC}
43 case `sysctl -n hw.machine_arch` in
45 for i in ${ldconfig_local32_dirs}; do
46 if [ -d "${i}" ]; then
47 _files=`find ${i} -type f`
48 if [ -n "${_files}" ]; then
49 ldconfig32_paths="${ldconfig32_paths} `cat ${_files} | sort -u`"
54 for i in ${ldconfig32_paths}; do
55 if [ -r "${i}" ]; then
60 echo '32-bit compatibility ldconfig path:' ${_LDC}
61 ${ldconfig} -32 ${_ins} ${_LDC}
65 case `sysctl -n hw.machine_arch` in
67 for i in ${ldconfig_localsoft_dirs}; do
68 if [ -d "${i}" ]; then
69 _files=`find ${i} -type f`
70 if [ -n "${_files}" ]; then
71 ldconfigsoft_paths="${ldconfigsoft_paths} `cat ${_files} | sort -u`"
76 for i in ${ldconfigsoft_paths}; do
77 if [ -r "${i}" ]; then
82 echo 'Soft Float compatibility ldconfig path:' ${_LDC}
83 ${ldconfig} -soft ${_ins} ${_LDC}
87 # Legacy aout support for i386 only
88 case `sysctl -n hw.machine_arch` in
90 # Default the a.out ldconfig path.
91 : ${ldconfig_paths_aout=${ldconfig_paths}}
93 for i in /usr/lib/aout ${ldconfig_paths_aout} /etc/ld.so.conf; do
94 if [ -r "${i}" ]; then
98 check_startmsgs && echo 'a.out ldconfig path:' ${_LDC}
99 ${ldconfig} -aout ${_ins} ${_LDC}