7 # REQUIRE: mountcritremote FILESYSTEMS
13 ldconfig_command="/sbin/ldconfig"
14 start_cmd="ldconfig_start"
22 ldconfig=${ldconfig_command}
23 checkyesno ldconfig_insecure && _ins="-i"
24 if [ -x "${ldconfig_command}" ]; then
26 for i in ${ldconfig_local_dirs}; do
27 if [ -d "${i}" ]; then
28 _files=`find ${i} -type f`
29 if [ -n "${_files}" ]; then
30 ldconfig_paths="${ldconfig_paths} `cat ${_files} | sort -u`"
34 for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
35 if [ -r "${i}" ]; then
39 check_startmsgs && echo 'ELF ldconfig path:' ${_LDC}
40 ${ldconfig} -elf ${_ins} ${_LDC}
42 case `sysctl -n hw.machine_arch` in
44 for i in ${ldconfig_local32_dirs}; do
45 if [ -d "${i}" ]; then
46 _files=`find ${i} -type f`
47 if [ -n "${_files}" ]; then
48 ldconfig32_paths="${ldconfig32_paths} `cat ${_files} | sort -u`"
53 for i in ${ldconfig32_paths}; do
54 if [ -r "${i}" ]; then
59 echo '32-bit compatibility ldconfig path:' ${_LDC}
60 ${ldconfig} -32 -m ${_ins} ${_LDC}
64 # Legacy aout support for i386 only
65 case `sysctl -n hw.machine_arch` in
67 # Default the a.out ldconfig path.
68 : ${ldconfig_paths_aout=${ldconfig_paths}}
70 for i in /usr/lib/aout ${ldconfig_paths_aout} /etc/ld.so.conf; do
71 if [ -r "${i}" ]; then
75 check_startmsgs && echo 'a.out ldconfig path:' ${_LDC}
76 ${ldconfig} -aout ${_ins} ${_LDC}