3 # $NetBSD: ldconfig,v 1.5 2002/03/22 04:33:58 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/ldconfig,v 1.7 2003/06/30 15:02:05 trhodes Exp $
5 # $DragonFly: src/etc/rc.d/ldconfig,v 1.1 2003/07/24 06:35:37 dillon Exp $
9 # REQUIRE: mountall mountcritremote
11 # KEYWORD: DragonFly FreeBSD NetBSD
16 ldconfig_command="/sbin/ldconfig"
17 start_cmd="ldconfig_start"
25 ldconfig=${ldconfig_command}
26 checkyesno ldconfig_insecure && _ins="-i"
27 if [ -x "${ldconfig_command}" ]; then
29 for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
30 if [ -r "${i}" ]; then
34 echo 'ELF ldconfig path:' ${_LDC}
35 ${ldconfig} -elf ${_ins} ${_LDC}
36 # Legacy aout support for i386 only
37 case `sysctl -n hw.machine_arch` in
39 # Default the a.out ldconfig path.
40 : ${ldconfig_paths_aout=${ldconfig_paths}}
42 for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do
43 if [ -r "${i}" ]; then
47 echo 'a.out ldconfig path:' ${_LDC}
48 ${ldconfig} -aout ${_ins} ${_LDC}
56 ldconfig=${ldconfig_command}
57 checkyesno ldconfig_insecure && _ins="-i"
58 if [ -x "${ldconfig_command}" ]; then
60 for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
61 if [ -r "${i}" ]; then
65 echo 'ELF ldconfig path:' ${_LDC}
66 ${ldconfig} -elf ${_ins} ${_LDC}
68 # Legacy aout support for i386 only
69 case `sysctl -n hw.machine_arch` in
71 # Default the a.out ldconfig path.
72 : ${ldconfig_paths_aout=${ldconfig_paths}}
74 for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do
75 if [ -r "${i}" ]; then
79 echo 'a.out ldconfig path:' ${_LDC}
80 ${ldconfig} -aout ${_ins} ${_LDC}
86 if [ -f ${ldconfig_command} ]; then
87 echo "Creating a.out runtime link editor directory cache."