$Id$ tags aren't required to have a file in CVS, just an extra. I prefer
to get specific with my keywords and use $File$, $Author$, $Revision$ on
separate lines I was intending to only add RCS keywords to files that I
edit, the first time i edit them. If I was going to do LFS I'd start
with all config files in source control. Worst case, if you screw
something up, you can use RCS from a boot disk to manually restore the
file to any revision you have made, including factory default. I see the
PITA involved in the extra steps to tweaking a config:

$ cd /etc/mail
$ cvs update
$ vi sendmail.cf        #yes VI, MUWAHHHHHhahahahahah
$ cvs commit


But the advantages (to me) outweigh the pain. 

--Christopher


On Wed, 2001-12-12 at 04:38, Jacob Meuser wrote:
> On Tue, Dec 11, 2001 at 07:51:39PM -0800, Christopher Maujean wrote:
> > I was wondering how many people kept their /etc under CVS control. I
> > haven't found any cons to it so far, but it's not mentioned in any of my
> > "sysadmin" books. Are there reasons (besides not wanting to take the
> > extra steps to change a config file, and the potential security hole
> > generated by not properly configuring the CVS pserver) not to? 
> 
> I don't keep /etc under CVS, but it does sound like a good idea ...
> 
> Except ... 
> 
> It could be a PITA to put $Id$ tags in every file, and make sure they 
> don't affect the workings of the file.
> 
> (most) package managers (OpenBSD has a policy that forbids fiddling with 
> /etc, instead, new versions of config files are installed to 
> $PREFIX/share/examples/$name_of_pkg) keep track of files in /etc and 
> modifying them could lead to more PITAes at update/upgrade time
> 
> But, how many config files do you really need to keep tabs on?  It might
> be easier to just write a sh or perl script, or Makefile for that matter,
> to copy the files you want to save to a safe place and then maybe even 
> automatically produce diffs of your version vs the default version?
> 
> I could like something like that ...
> 
> /ec/Makefile.lo-tek
> *-----------------*
> DIR=  /etc
> 
> FILES=        rc.conf.local rc.local rc.shutdown mail/sendmail.cf mail/aliases \
>       hosts group passwd fstab sshd_config
> 
> XDIRS=        mail
> 
> SAVE_DIR= /var/save/root
> 
> DIFF_DIR= /var/save/diffs
> 
> INSTALL_DATA= /usr/bin/install -c -m 444
> 
> INSTALL_DIR= /usr/bin/install -d
> 
> save-dir:
>       test -d ${SAVE_DIR} || ${INSTALL_DIR} ${SAVE_DIR}
> 
> xdirs:
> .for i in ${XDIRS}
>       ${INSTALL_DIR} ${SAVE_DIR}/${i}
> .endfor
> 
> save: save-dir xdirs
> .for i in ${FILES}
>       ${INSTALL_DATA} ${DIR}/${i} ${SAVE_DIR}/${i}
> .endfor
> 
> update: save
>       echo "garbage" >> /etc/hosts
>       echo "Eugene\nUnix\nand\nGNU\n/Linux\nUsers\nGroup\nwas\nhere!" \
>               >> /etc/mail/sendmail.cf
>       # as "for example"s, more interesting would be
>       # cd / && tar zxpvf /pub/EUGLIX/etc01.tgz
>       # apt-get update && apt-get upgrade
>       # but then, these .for loops don't work
>       # with GNU make (wouldn't be hard to "port"
>       # though)
> 
> diff-dir:
>       ${INSTALL_DIR} ${DIFF_DIR}
> 
> diff: update diff-dir
> .for i in ${FILES}
>       cmp -s ${DIR}/${i} ${SAVE_DIR}/${i} || \
>       diff -u ${DIR}/${i} ${SAVE_DIR}/${i} > \
>               ${DIFF_DIR}/${i:S/\//-/g}.diff || /usr/bin/true
> .endfor
> 
> recover: diff
> .for i in ${FILES}
>       test -f ${DIFF_DIR}/${i:S/\//-/g}.diff && \
>               patch -p 0 < ${DIFF_DIR}/${i:S/\//-/g}.diff || \
>               /usr/bin/true
> .endfor
> *------------------*
> 
> -- 
> <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]>
-- 
Christopher Maujean
IT Director, Premierelink Communications
[EMAIL PROTECTED]
http://www.premierelink.com/
541-344-8575x305

PGP:
---------------------------------------------------------------
http://www.keyserver.net/
      KeyID: EFAF4176
Fingerprint: 55E6 4DE1 D7D3 361E F265  C094 46F2 7B62 EFAF 4176
---------------------------------------------------------------

Reply via email to