[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Version control for /etc

From: Michael Hogsett <hogsett_at_csl.sri.com>
Date: 2005-03-22 23:06:28 CET

Grzegorz Dostatni wrote:
> I am trying to setup a svn repository for /etc for a number of servers.
> Has anyone tried doing that?
>
> I am currently having problem with the intial checkout. I can import /etc
> tree into the repository, but subversion will not allow me to overwrite
> files on checkout. For a good reason :-)
>
> Is it possible to setup the repository without rebooting the server (and
> mounting /etc from a knoppix cd or something similar).
>
> Any help will be greatly appreciated.

The checkout operation sounds dangerous.

What about :

; cd /
; svn checkout file:///repo/etc etc-repo
; ( /bin/mv /etc /etc.orig ; /bin/mv /etc-repo /etc )

Although this may break your host in terrible and mysterious ways.

I wrap the two moves in parens so that we invoke a subshell
(assuming bash) before performing the move so that, hopefully,
any of the shell's dependence on the files in there are minimized.
Note, the second invokation of /bin/mv needs to run without an etc
directory (eeek!).

Also this may present a problem if any programs have any open
file descripters to files in the original /etc since those open
file descripters will still point to the open files now located
in /etc.orig/

Good Luck. Your 'boot to alternate OS' idea sounds less risky.

  - Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 22 23:12:19 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.