Fix UTIME_OMIT handling
[dragonfly.git] / etc / rc.d / ldconfig
blobc95c9d837786412d0b60a9ab309f3adbb3ce371b
1 #!/bin/sh
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 $
7 # PROVIDE: ldconfig
8 # REQUIRE: mountcritremote
9 # BEFORE: SERVERS
11 . /etc/rc.subr
13 name="ldconfig"
14 ldconfig_command="/sbin/ldconfig"
15 start_cmd="ldconfig_start"
16 stop_cmd=":"
18 ldconfig_start()
20 _ins=
21 ldconfig=${ldconfig_command}
22 checkyesno ldconfig_insecure && _ins="-i"
23 if [ -x "${ldconfig_command}" ]; then
24 _LDC=""
25 for i in ${ldconfig_local_dirs}; do
26 if [ -d "${i}" ]; then
27 ldconfig_paths="${ldconfig_paths} `find ${i} -type f`"
29 done
30 for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
31 if [ -r "${i}" ]; then
32 _LDC="${_LDC} ${i}"
34 done
35 echo 'ELF ldconfig path:' ${_LDC}
36 ${ldconfig} -elf ${_ins} ${_LDC}
40 load_rc_config $name
41 run_rc_command "$1"