A smarter mergemaster

Ashley Moran work at ashleymoran.me.uk
Fri Sep 30 07:21:42 PDT 2005


Daniel O'Connor wrote:
> On Friday 30 September 2005 18:23, Ashley Moran wrote:
>
> It sure would be nice :)
> One thing would be to have automatically fetched etc directories so when you 
> ran it for the first time it would grab a release version of etc for you :)
> Hmm.. I'll try and add that if I get some time I think!
> 


Funny you should say that... I had a crack at something similar myself 
(see below).  But I was hampered by the fact that

a) I had never used CVS before (we use <whisper>VSS</whisper> here but 
I'm moving it all to SVN), and
b) I have no idea how the FreeBSD build process works
(I'm a hardcore hacker lol)

Unfortunately it seems that config files for the subsystems (eg SSH) are 
stored separately in the CVS tree and I didn't have time to work out 
where they live.

While we're on the subject, how do you handle the DB files?  I don't see 
any special mention of them in the man pages.  When I last etcmerged I 
glossed over them and haven't had any login problems since.


Ashley





Here is my effort:

#!/bin/sh
# takes one argument: name of the tag to get from CVS

cd /var/db

# clear out any previous files
rm -rf etc

# fetch new etc files from cvs
export CVSROOT=:pserver:anoncvs:anoncvs at anoncvs.fr.FreeBSD.org:/home/ncvs
cvs login
cvs -QR export -r$1 etc
cvs logout

cd etc

# local adjustment
mv etc.i386/ttys .

# clear out the other platform-specific files
rm -r etc.*


More information about the freebsd-hackers mailing list