summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-09-16 05:42:38 +0000
committerjdp <jdp@FreeBSD.org>1998-09-16 05:42:38 +0000
commita14a068430d05661faf95dba22fae8f4842fd0d4 (patch)
treefc38295777d18fd7ef06c13b63a6456203ba280d /etc/rc
parent3d503d8e05a63800304b3b3aa6446befac796172 (diff)
downloadFreeBSD-src-a14a068430d05661faf95dba22fae8f4842fd0d4.zip
FreeBSD-src-a14a068430d05661faf95dba22fae8f4842fd0d4.tar.gz
Fix up the boot-time ldconfig handling to deal with dual object
file formats. I have added a new rc.conf variable ${ldconfig_paths_aout} which is like ${ldconfig_paths}, but only for a.out shared libraries. On a "standard" ELF system, the ELF ldconfig path is taken from ${ldconfig_paths}, while the a.out ldconfig path is taken from ${ldconfig_paths_aout}. On a not-yet-converted a.out system, only the a.out ldconfig path is set, and it is taken from ${ldconfig_paths_aout}. If that variable is unset, /etc/rc defaults it to the value of ${ldconfig_paths}, on the assumption that the system's "/etc/rc.conf" file hasn't been updated.
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc18
1 files changed, 16 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index a52a7e4..1dee352 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: rc,v 1.154 1998/09/09 22:27:21 jraynard Exp $
+# $Id: rc,v 1.155 1998/09/14 09:14:46 sos Exp $
# From: @(#)rc 5.27 (Berkeley) 6/5/91
# System startup script run by init on autoboot
@@ -245,8 +245,22 @@ fi
# Make shared lib searching a little faster. Leave /usr/lib first if you
# add your own entries or you may come to grief.
if [ -x /sbin/ldconfig ]; then
+ if [ X"`/usr/bin/objformat`" = X"elf" ]; then
+ _LDC=/usr/lib
+ for i in $ldconfig_paths; do
+ if test -d $i; then
+ _LDC="${_LDC} $i"
+ fi
+ done
+ echo 'setting ELF ldconfig path:' ${_LDC}
+ ldconfig -elf ${_LDC}
+ fi
+
+ # Default the a.out ldconfig path, in case the system's
+ # /etc/rc.conf hasn't been updated.
+ : ${ldconfig_paths_aout=${ldconfig_paths}}
_LDC=/usr/lib/aout
- for i in $ldconfig_paths; do
+ for i in $ldconfig_paths_aout; do
if test -d $i; then
_LDC="${_LDC} $i"
fi
OpenPOWER on IntegriCloud