Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2012 21:56:28 +1000
From:      Da Rock <freebsd-questions@herveybayaustralia.com.au>
To:        freebsd-questions@freebsd.org
Subject:   Re: /usr/home vs /home
Message-ID:  <4F3F91EC.8020209@herveybayaustralia.com.au>
In-Reply-To: <20120218123943.147a7842.freebsd@edvax.de>
References:  <4F3ECF23.5000706@fisglobal.com> <20120217234623.cf7e169c.freebsd@edvax.de> <3D08D03C85ACFBB1ABCDC5DA@mac-pro.magehandbook.com> <alpine.BSF.2.00.1202172316230.11247@abbf.6qbyyneqvnyhc.pbz> <20120218112252.772c878b.freebsd@edvax.de> <4F3F80FD.8070201@herveybayaustralia.com.au> <20120218123943.147a7842.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 02/18/12 21:39, Polytropon wrote:
> On Sat, 18 Feb 2012 20:44:13 +1000, Da Rock wrote:
>> BTW I was intending to put across the concept of /usr being user related
>> - anything a user may need or use; as opposed to / for the system
>> related stuff that keeps it running. Maybe I wasn't as clear as I had
>> thought... :)
> There's lots of philosophy, tradition and vanished differentiation
> in this field. The manpage "man hier" provides a good explaination
> for the layout chosen for FreeBSD. However, there are questions
> that may arise:
>
> What kind of programs? Those called by users, by the system, or
> by other programs (see libexec)?
/usr/local/libexec is used by the programs usually initiated by users. 
As per the man /libexec contains sub programs for those in /bin or /sbin.

The programs are usually run by users, or run as a user themselves 
(multiuser mode).
> What's the difference between /bin and /sbin, same for /usr/bin
> and /usr/sbin? Could they maybe be merged when their functionality
> is similar and they reside on the same partition (file system)
> anyway?
Single-user mode v multiuser mode. Most of those in /bin /sbin are 
required minimal to revive a non functioning system.
> The /etc directory - "editable text configuration" :-) - historically
> also contained binaries like /etc/mount or /etc/GETTY. Depending
> on its location, one can assume that it controls OS things only.
> Wrong. In many cases, /etc/rc.conf also contains settings for
> enabling services installed by ports. Even though FreeBSD can
> use /etc/rc.conf.local (has been known in OpenBSD for non-OS
> setup stuff), most things are found in the system-wide file.
> But the corresponding start scripts are in /usr/local/etc/rc.d.
> Why no /usr/local/etc/rc.conf? But as rc.conf is just a file to
> associate variables with names, there's no problem if they are
> defined, but not used (e. g. in a limited system state after
> encountering a problem)...
I think you _could_ use /usr/local/etc/rc.conf (or .local). I'd have to 
look it up to be sure, but I'm sure I've stumbled on it. Most of us are 
lazy though :) easier in just one file... besides, handbook says so so 
it must be right :)
> Luckily, most software installed from ports keeps its settings
> out of /etc and uses /usr/local/etc instead. Having _known_
> locations for settings makes it easy to back them up.
>
> How about X on desktops? /etc/X11 is the common location for
> config files (if used), but per deduction, they should be in
> /usr/local/etc/X11 as X is a port, not a part of the OS. What
> about the configuration of xdm? Why isn't it stored in some
> /usr/local/etc subtree, but instead /usr/local/lib/X11/xdm/
> is used?
X11 I think is. It just isn't completely filled with the conf files - 
but you can override the globals there if you choose. It does get 
confusing though.

XDM is an embarrassment :P It _should_ be run as a daemon from rc.conf, 
but you set it in /etc/tty, so no real surprise that its conf files are 
chaotic too...
> This short list is just to mention the loads of philosophy
> hidden within the system. :-)
I'm no expert, but for the most part it all makes sense (I think); 
either that or I could be suffering from stockholm syndrome :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F3F91EC.8020209>