1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $NetBSD: ldconfig,v 1.2 2000/05/13 08:45:07 lukem Exp $
| 3# $NetBSD: ldconfig,v 1.5 2002/03/22 04:33:58 thorpej Exp $ 4# $FreeBSD: head/etc/rc.d/ldconfig 98184 2002-06-13 22:14:37Z gordon $
|
4# 5 6# PROVIDE: ldconfig 7# REQUIRE: mountall
| 5# 6 7# PROVIDE: ldconfig 8# REQUIRE: mountall
|
| 9# BEFORE: DAEMON 10# KEYWORD: FreeBSD NetBSD
|
8 9. /etc/rc.subr 10 11name="ldconfig"
| 11 12. /etc/rc.subr 13 14name="ldconfig"
|
| 15ldconfig_command="/sbin/ldconfig"
|
12start_cmd="ldconfig_start" 13stop_cmd=":" 14 15ldconfig_start() 16{
| 16start_cmd="ldconfig_start" 17stop_cmd=":" 18 19ldconfig_start() 20{
|
17 if [ -f /sbin/ldconfig ]; then 18 echo "Creating a.out runtime link editor directory cache." 19 ldconfig 20 fi
| 21 case `${CMD_OSTYPE}` in 22 FreeBSD) 23 ldconfig=${ldconfig_command} 24 checkyesno ldconfig_insecure && ldconfig="${ldconfig} -i" 25 if [ -x "${ldconfig_command}" ]; then 26 case `/usr/bin/objformat` in 27 elf) 28 _LDC=/usr/lib 29 for i in ${ldconfig_paths}; do 30 if [ -d "${i}" ]; then 31 _LDC="${_LDC} ${i}" 32 fi 33 done 34 echo 'ELF ldconfig path:' ${_LDC} 35 ${ldconfig} -elf ${_LDC} 36 ;; 37 esac 38 39 # Legacy aout support for i386 only 40 case `sysctl -n hw.machine_arch` in 41 i386) 42 # Default the a.out ldconfig path. 43 : ${ldconfig_paths_aout=${ldconfig_paths}} 44 _LDC=/usr/lib/aout 45 for i in ${ldconfig_paths_aout}; do 46 if [ -d "${i}" ]; then 47 _LDC="${_LDC} ${i}" 48 fi 49 done 50 echo 'a.out ldconfig path:' ${_LDC} 51 ${ldconfig} -aout ${_LDC} 52 ;; 53 esac 54 fi 55 ;; 56 NetBSD) 57 if [ -f ${ldconfig_command} ]; then 58 echo "Creating a.out runtime link editor directory cache." 59 ${ldconfig_command} 60 fi 61 ;; 62 *) 63 ;; 64 esac
|
21} 22 23load_rc_config $name 24run_rc_command "$1"
| 65} 66 67load_rc_config $name 68run_rc_command "$1"
|