Start removing the old build infrastructure for the a.out
[dragonfly.git] / etc / rc.d / ldconfig
CommitLineData
9c600e7d
MD
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 $
aa8d5dcb 5# $DragonFly: src/etc/rc.d/ldconfig,v 1.5 2004/03/20 16:27:39 drhodus Exp $
9c600e7d
MD
6#
7
8# PROVIDE: ldconfig
9# REQUIRE: mountall mountcritremote
10# BEFORE: DAEMON
2c604523 11# KEYWORD: DragonFly
9c600e7d
MD
12
13. /etc/rc.subr
14
15name="ldconfig"
16ldconfig_command="/sbin/ldconfig"
17start_cmd="ldconfig_start"
18stop_cmd=":"
19
20ldconfig_start()
21{
9c600e7d 22 _ins=
f6d60b69
EN
23 ldconfig=${ldconfig_command}
24 checkyesno ldconfig_insecure && _ins="-i"
25 if [ -x "${ldconfig_command}" ]; then
4806ab2e 26 _LDC="/usr/lib /usr/lib/gcc*"
f6d60b69
EN
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}
f6d60b69 34 fi
9c600e7d
MD
35}
36
37load_rc_config $name
38run_rc_command "$1"