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.
This commit is contained in:
parent
1bf62d7dba
commit
34908526f4
18
etc/rc
18
etc/rc
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# From: @(#)rc 5.27 (Berkeley) 6/5/91
|
||||||
|
|
||||||
# System startup script run by init on autoboot
|
# 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
|
# Make shared lib searching a little faster. Leave /usr/lib first if you
|
||||||
# add your own entries or you may come to grief.
|
# add your own entries or you may come to grief.
|
||||||
if [ -x /sbin/ldconfig ]; then
|
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
|
_LDC=/usr/lib/aout
|
||||||
for i in $ldconfig_paths; do
|
for i in $ldconfig_paths_aout; do
|
||||||
if test -d $i; then
|
if test -d $i; then
|
||||||
_LDC="${_LDC} $i"
|
_LDC="${_LDC} $i"
|
||||||
fi
|
fi
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# All arguments must be in double or single quotes.
|
# 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 #####################
|
### 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).
|
rand_irqs="NO" # Stir the entropy pool (like "5 11" or NO).
|
||||||
clear_tmp_enable="NO" # Clear /tmp at startup.
|
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="/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_enable="NO" # kernel security level (see init(8)),
|
||||||
kern_securelevel="-1" # range: -1..2 ; `-1' is the most insecure
|
kern_securelevel="-1" # range: -1..2 ; `-1' is the most insecure
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user