/etc and /usr/local/etc
gedge-lists at yadn.org
Wed Jun 21 00:42:36 BST 2006
Stephen Allen <freebsduk at rowyerboat.com> said
(on Tue, Jun 20, 2006 at 08:49:38PM +0100):
> anything I install after the initial
> installation will use /usr/local/.
That's a fair description, I'd say. /etc is for the base system,
/usr/local/etc is for ports and other add-on packages.
> I'm used to seeing
> /etc/samba/smb.conf but now have to go for /usr/local/etc/smb.conf.
You seem to be used to the Linux way.
A given app could come bundled with one Linux distro (so would be
called "base" in the BSD world), but the same app may have to be
installed by hand in another distro (e.g. called a "port" or
"package", perhaps). With a good number of Linux distros around,
each choosing that app as either "base" or "package", the easy
route for Linux is to install the app to the same place.
(I'm not suggesting, however, that the easy way is the best way.)
Imagine that you want two versions of an application on your
system because you want the system/base one to be used by base
apps (reliably), and you also want a more recent package version
(more up-to-date and offers better features). This /etc and
/usr/local/etc distinction allows this to be done trivially using
ports on *BSD.
Indeed, there are several important apps which have separate base
and port versions (BIND, openssl and perl to name but three).
It's handy to be able to keep base and package from each other.
> How do other people deal with this?
What's to deal with? You don't really describe a problem.
Solaris packages are different, too - a Solaris package has been
known to spray files around /opt, /var/opt and /etc/opt.
Getting used to different O/S's putting things in different
directories is like getting used to your friends putting their
margarine on different shelves in their respective fridges.
There's no One True Way [tm]. Linux is not the only fridge.
Geraint A. Edwards (aka "Gedge")
gedge at yadn.org
 vegan margarine, if it's my fridge
More information about the Ukfreebsd