libefivar: Remove unneeded WARNS setting (lib/Makefile.inc has it).
[dragonfly.git] / etc / rc.d / ldconfig
blob5564efb83895e1cdf14b83f36441a3babbe4ead6
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 $
5 # $DragonFly: src/etc/rc.d/ldconfig,v 1.8 2008/04/15 10:11:35 swildner Exp $
8 # PROVIDE: ldconfig
9 # REQUIRE: mountcritremote
10 # BEFORE: DAEMON
12 . /etc/rc.subr
14 name="ldconfig"
15 ldconfig_command="/sbin/ldconfig"
16 start_cmd="ldconfig_start"
17 stop_cmd=":"
19 ldconfig_start()
21 _ins=
22 ldconfig=${ldconfig_command}
23 checkyesno ldconfig_insecure && _ins="-i"
24 if [ -x "${ldconfig_command}" ]; then
25 _LDC=""
26 for i in ${ldconfig_local_dirs}; do
27 if [ -d "${i}" ]; then
28 ldconfig_paths="${ldconfig_paths} `find ${i} -type f`"
30 done
31 for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
32 if [ -r "${i}" ]; then
33 _LDC="${_LDC} ${i}"
35 done
36 echo 'ELF ldconfig path:' ${_LDC}
37 ${ldconfig} -elf ${_ins} ${_LDC}
41 load_rc_config $name
42 run_rc_command "$1"