[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: freezing cvs repository to rsync to a remote location

From: Todd Denniston
Subject: Re: freezing cvs repository to rsync to a remote location
Date: Fri, 05 Nov 2004 09:48:29 -0500

address@hidden wrote:
> Does anyone know of a good (and safe) way to lock users out of the cvs 
> repository so we can rsync the repository to a remote site and not risk any 
> data corruption?
> -T
If you are using pserver (not really a recommended method any more) then
with xinetd (on linux):
 echo -e ",s/disable\t= no/disable\t= yes/\nwq\n"| \
     ed $XINETD_PSERVER_SCRIPT >> /dev/null 2>&1
    $KILLALL -HUP xinetd
     echo -e ",s/disable\t= yes/disable\t= no/\nwq\n" | \
     ed $XINETD_PSERVER_SCRIPT >> /dev/null 2>&1
    $KILLALL -HUP xinetd
#note the tab between disable and the = sign
with inetd, comment the cvspserver line in /etc/inetd.conf and HUP inetd,
uncomment to bring it back on line.
you can do the same things for rsh (the rlogin config) as was done to
for ssh (this would probably work for rsh too) 
        echo "hey no logging in now, someone is working with cvs" >> 
        #make sure nothing else has lines in /etc/nologin then
        rm /etc/nologin

#after doing the above (preventing new sessions from being started) 
#you need to stop any current sessions.
sleep 10 #give them a chance for graceful exit
sleep 20 #give them another chance for graceful exit

Now only root can login to the machine and there should be no cvs activity.
And of course you need to undo the changes to the system config you did, to
restart things.

The above works for me, YMMV, all warranties are faulty, don't cry, I am not
responsible for your safety, try it where you don't care first.

As Mark said CVSup may be better suited to your needs than the method you have
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter
The opinions expressed here are not sanctioned by and do not necessarily 
represent those of my employer.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]