On Thu, 29 Mar 2018 21:31:16 +0000, bob prohaska wrote:
> That's the sort of manual configuration I was hoping to avoid, but maybe
> there's no choice. Replacing directories isn't too bad, but knowing
> which directories to replace and files to edit is likely to provoke some
> hair pulling.
>
This is exactly why some of us keep the config files we've edited in one
of our user directories, and make a copy of the file each time its
modified and working the way we want. Example: supposed I have a host
named babel and I've just edited /etc/profile.d/less.sh and like the
result, I'll copy it to ~/babel/etc/profile.d/less.sh - this way I not
only have a record of my changes but I also know exactly where to put my
copy after I've done a clean install and retrieved the /home directory
structure from the latest backup.
> To my surprise, I looked in /usr/local/etc and found it empty. Thank you
> for the warning!
>
/usr/local/etc is AFAIK never used by distro packages. Just as you should
put programs you write in /usr/local/bin rather than /usr/bin, so you
should put their config files, if any, in /usr/local/etc
Similarly, if you download and compile source for a FOSS program you
should change its install tools to put the program in /usr/local/bin, any
new libraries in /usr/local/lib and its config file(s) in /usr/local/etc
because that makes sure that you, if the program should become part of a
standard package, your local version can't interfere with the package
version and vice versa. Note that I said "change its install tools"
because you'll find that all too many FOSS tarballs will try to install
stuff in /usr/bin, /usr/lib and /etc
There's another useful trick as well: run these two commands as root:
mv /usr/local /home/local
ln -s /home/local /usr/local
so that the /usr/local structure is now in /home/local and you've set up
a symlink called /usr/local that links to it. Why? Because this means
that everything you put in /usr/local is now backed up along with all
your stuff in /home *and will survive a clean install* because all you
need to do after a clean install and recovering /home from a backup is to
run as root:
rm -rf /usr/local
ln -s /home/local /usr/local
and all your locally developed and manually installed FOSS stuff will be
ready to use immediately.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|