From owner-freebsd-hackers Thu Jun 5 21:53:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA26884 for hackers-outgoing; Thu, 5 Jun 1997 21:53:02 -0700 (PDT) Received: from time.cdrom.com (root@time.cdrom.com [204.216.27.226]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA26875 for ; Thu, 5 Jun 1997 21:52:58 -0700 (PDT) Received: from time.cdrom.com (jkh@localhost [127.0.0.1]) by time.cdrom.com (8.8.5/8.6.9) with ESMTP id VAA18647 for ; Thu, 5 Jun 1997 21:53:09 -0700 (PDT) To: hackers@freebsd.org Subject: Any objection to the following? Date: Thu, 05 Jun 1997 21:53:09 -0700 Message-ID: <18643.865572789@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk This brings in the /etc/ld.so.conf behavior from NetBSD/Linux and makes it possible to add directories to the ldconfig list without editing /etc/rc.conf. Since this is also a zero-impact change (if you have no ld.so.conf, and there would be no default, it does nothing) it would also go into 2.2. Jordan Index: rc =================================================================== RCS file: /home/ncvs/src/etc/rc,v retrieving revision 1.104.2.16 diff -u -r1.104.2.16 rc --- rc 1997/05/19 08:02:37 1.104.2.16 +++ rc 1997/06/06 01:31:11 @@ -205,14 +205,19 @@ accton /var/account/acct fi -# Make shared lib searching a little faster. Leave /usr/lib first if you -# add your own entries or you may come to grief. -_LDC=/usr/lib -if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi -if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi -if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi -echo 'setting ldconfig path:' ${_LDC} -ldconfig ${_LDC} +# If we have an ld.so.conf file, let it do the job. +if [ -f /etc/ld.so.conf -a -r /etc/ld.so.conf ]; then + echo 'setting ldconfig path from /etc/ld.so.conf' + ldconfig `cat /etc/ld.so.conf` +else + # Leave /usr/lib first when adding entries or you may come to grief. + _LDC=/usr/lib + if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi + if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi + if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi + echo 'setting ldconfig path:' ${_LDC} + ldconfig ${_LDC} +fi # Now start up miscellaneous daemons that don't belong anywhere else #