[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] controlling /etc with arch
From: |
Jan Hudec |
Subject: |
Re: [Gnu-arch-users] controlling /etc with arch |
Date: |
Mon, 9 Aug 2004 08:21:20 +0200 |
User-agent: |
Mutt/1.5.6+20040722i |
On Mon, Aug 09, 2004 at 15:23:06 +1000, Geoff wrote:
> Has anyone got any recipies or experience to share about using arch to
> control the /etc directory on a machine? I've looked around a bit, but
> haven't any cases of people documenting how they approached it on the web.
I've been doing it for a while.
You need a version of tla that does name escaping, since some names may
contain spaces.
Then you need to set up a tagging-method where everything is source,
except for things known to be backup. I use (~|\.dpkg-[a-z.-]*)$ for
backup --- that's for debian, I am not sure how other package managers
name the backup configs when upgrading a package. The unrecognized must
be explicitely set to ^$, otherwise it will use the default, which you
don't want. I also exclude mtab and network/ifstate, using the
.arch-inventory files.
And you need to commit periodicaly. I call tla diff || tla commit from
cron.
I have a small perl script in address@hidden/etcguard--main--0
(http://www.ucw.cz/~bulb/{archives}/utils-2004). The script installs the
tagging method in the begining and then it wraps few tla commands.
It has diff, which calls changes --diffs; ci, which calls vim on the
patchlog and then calls commit (it uses command options of vim to show
the changes beside the log); and autoci, which outputs changes and if
there are any, commits with a standard log. This is what I call from
cron.
The script should perhaps be in contrib somewhere, but it will need some
configurability before that. It has everything hardcoded just now.
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec
<address@hidden>
signature.asc
Description: Digital signature