Date: Sat, 12 Jul 1997 05:24:27 -0700 From: "Jordan K. Hubbard" <jkh@time.cdrom.com> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: torstenb@ramsey.tb.9715.org, current@FreeBSD.ORG, hans@brandinnovators.com Subject: Re: Heads up and and a call for a show of hands. Message-ID: <7882.868710267@time.cdrom.com> In-Reply-To: Your message of "Sat, 12 Jul 1997 03:00:42 PDT." <199707121000.DAA06924@silvia.HIP.Berkeley.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
> The point is that, either way, there is an existing mechanism that can
> easily be used without a need for additional features added to
> ldconfig and/or /etc/rc.
While this is true, I don't see it as an effective argument for
mandating only _one_ way of doing things.
More to the point, I think that it's actually far more of a stretch to
have the local package startup mechanism setting the ldconfig path
than it is to have a specific mechanism for that purpose. I've had
users ask me why, for example, that "modula3 needed a daemon." It
doesn't, of course, but their confusion stems from the fact that
during boot, the user sees something like:
Local package initialization: apache m3 sshd
And jumps to the obvious conclusion. /etc/ld.so.conf also appears in
other UN*X environments, it's hardly a BSD first, and a growing number
of admins are beginning to look there for override control. Our
${prefix}/etc/rc.d hack is, by contrast, something very FreeBSD
specific.
As to the question of "override vs overlay", after listening to
various people's comments, I'm thinking that the following compromise
scenario would also make some sense:
First, we change:
local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs.
To:
local_dirs="/usr/local /usr/X11R6" # local hierarchies of importance.
local_startup=YES # NO to deactivate local scripts.
And then change this code in rc to:
if [ "X${local_startup}" != X"NO" ]; then
echo -n 'Local package initialization:'
for dir in ${local_dirs}; do
[ -d ${dir} ] && for script in ${dir}/etc/rc.d/*.sh; do
[ -x ${script} ] && ${script} start
done
done
echo .
fi
Once that's done, we can build the initial ld path by saying:
if [ -f /etc/ld.so.conf ]; then
_LDC=/etc/ld.so.conf
else
_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
for dir in ${local_dirs}; do
if [ -f ${dir}/etc/ld.so.conf ]; then
_LDC="${dir}/etc/ld.so.conf ${_LDC}"
fi
done
fi
and that gives you both an engineer's override and configurable,
vendor-editable files which follow the default ldpath.
Jordan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7882.868710267>
