Start removing the old build infrastructure for the a.out
[dragonfly.git] / etc / rc.d / ldconfig
1 #!/bin/sh
2 #
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.5 2004/03/20 16:27:39 drhodus Exp $
6 #
7
8 # PROVIDE: ldconfig
9 # REQUIRE: mountall mountcritremote
10 # BEFORE:  DAEMON
11 # KEYWORD: DragonFly
12
13 . /etc/rc.subr
14
15 name="ldconfig"
16 ldconfig_command="/sbin/ldconfig"
17 start_cmd="ldconfig_start"
18 stop_cmd=":"
19
20 ldconfig_start()
21 {
22                 _ins=
23                 ldconfig=${ldconfig_command}
24                 checkyesno ldconfig_insecure && _ins="-i"
25                 if [ -x "${ldconfig_command}" ]; then
26                         _LDC="/usr/lib /usr/lib/gcc*"
27                         for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do
28                                 if [ -r "${i}" ]; then
29                                         _LDC="${_LDC} ${i}"
30                                 fi
31                         done
32                         echo 'ELF ldconfig path:' ${_LDC}
33                         ${ldconfig} -elf ${_ins} ${_LDC}
34                 fi
35 }
36
37 load_rc_config $name
38 run_rc_command "$1"