summaryrefslogtreecommitdiffstats
path: root/etc
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
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')
-rw-r--r--etc/rc18
-rw-r--r--etc/rc.conf3
2 files changed, 18 insertions, 3 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
diff --git a/etc/rc.conf b/etc/rc.conf
index eba2b4f..4ab8413 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -6,7 +6,7 @@
#
# All arguments must be in double or single quotes.
#
-# $Id: rc.conf,v 1.56 1998/09/06 08:20:11 phk Exp $
+# $Id: rc.conf,v 1.57 1998/09/15 10:49:02 jkoshy Exp $
##############################################################
### Important initial Boot-time options #####################
@@ -157,6 +157,7 @@ linux_enable="NO" # Linux emulation loaded at startup (or NO).
rand_irqs="NO" # Stir the entropy pool (like "5 11" or NO).
clear_tmp_enable="NO" # Clear /tmp at startup.
ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib" # shared library search paths
+ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout" # a.out shared library search paths
kern_securelevel_enable="NO" # kernel security level (see init(8)),
kern_securelevel="-1" # range: -1..2 ; `-1' is the most insecure
OpenPOWER on IntegriCloud