3 # $NetBSD: ldconfig,v 1.5 2002/03/22 04:33:58 thorpej Exp $
8 # REQUIRE: mountcritremote cleanvar
14 ldconfig_command="/sbin/ldconfig"
15 start_cmd="ldconfig_start"
21 ldconfig=${ldconfig_command}
22 checkyesno ldconfig_insecure && _ins="-i"
23 if [ -x "${ldconfig_command}" ]; then
25 for i in ${ldconfig_local_dirs}; do
26 if [ -d "${i}" ]; then
27 ldconfig_paths="${ldconfig_paths} `find ${i} -type f`"
30 for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
31 if [ -r "${i}" ]; then
35 echo 'ELF ldconfig path:' ${_LDC}
36 ${ldconfig} -elf ${_ins} ${_LDC}
38 case `sysctl -n hw.machine_arch` in
40 for i in ${ldconfig_local32_dirs}; do
41 if [ -d "${i}" ]; then
42 ldconfig32_paths="${ldconfig32_paths} `find ${i} -type f`"
45 echo '32-bit compatibility ldconfig path:' ${ldconfig32_paths}
46 ${ldconfig} -32 -m ${_ins} ${ldconfig32_paths}
50 # Legacy aout support for i386 only
51 case `sysctl -n hw.machine_arch` in
53 # Default the a.out ldconfig path.
54 : ${ldconfig_paths_aout=${ldconfig_paths}}
56 for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do
57 if [ -r "${i}" ]; then
61 echo 'a.out ldconfig path:' ${_LDC}
62 ${ldconfig} -aout ${_ins} ${_LDC}