Betr: Re: Strategy for managing files in /etc, suggestions?

Chris Green cl at isbd.net
Thu Dec 17 10:14:31 UTC 2020


On Thu, Dec 17, 2020 at 10:53:19AM +0100, Alban Hertroys wrote:
>    >
>    > Thanks everyone, I'll go and scratch my head a bit and decide how to
>    > do it, and more likely to get it right[ish] with the help from here.
>    I have been playing with the idea of using a named branch per host and
>    then merge global changes between them.
>    To my situation that's not particularly applicable, I only sort-of
>    maintain a few systems, so I never had much incentive to test that out.
>    This seems the right time to mention it.

OP here, that's actually quite like what I use for maintaining code
already, I just haven't included /etc in it yet.

I have several (six at the present count) Linux systems, most on my
LAN but two are remote.  I have a directory ~/.cfg that contains all
my code and customisations and it's synchronized using syncthing
across all the systems.  It's also a mercurial repository (i.e.
there's a ~/.cfg/.hg).

Code that is common to all systems is in directories such as
~/.cfg/bin, code specific to a system is in ~/.cfg/<name>/bin.

Both ~/.cfg/bin and ~/.cfg/<name>/bin are in PATH.  It's very handy
changing something on one system and getting the changes automatically
on all systems.

I also have ~/.cfg/.bashrc and other such things in the repository.


This sounds very like what Alban is suggesting.

I guess it wouldn't be too difficult to add /etc to it.

-- 
Chris Green



More information about the Mercurial mailing list