Hello I make simple script for blocked release directory ;)
script file (executable) name blocker.sh --------------------cut------------------------ #/bin/sh # blocker 0.1 for centos :P # Piotr Maluty # piotr@maluty.pl
read_1=$(cat config | grep -v '#' | grep blocked_to | cut -d = -f 2) read_2=$(cat config | grep -v '#' | grep centos | cut -d = -f 2) read_3=$(cat config | grep -v '#' | grep releases | cut -d = -f 2)
date +%D | egrep "^$read_1$" || touch "$read_2/$read_3/.hidden"
if [ -e "$read_2/$read_3/.hidden" ] then echo this directory is hidden $read_3 chmod 711 "$read_2/$read_3" else echo release is public chmod 755 "$read_2/$read_3" rm -f 2>/dev/null "$read_2/$read_3/.hidden" cat config | egrep -q '^#releases' || sed -e s/releases=/#releases=/ config > config_ && mv 2>/dev/null config_ config fi rm -f 2>/dev/null "$read_2/$read_3/.hidden" ------------------cut-------------------
config file name "config" ---------------cut---------------------- # blocker 0.1 for centos :P # Piotr Maluty # piotr@maluty.pl
path_to_centos=/tmp/kopia/cent/centos/ # releases to blocked, when release is public this value is hashed and marked '#' # hashed is automatically, unhashed is manually releases=5.3 # date when will be public , after this time, release is permanent public blocked_to=03/29/09 ---------------cut------------------------
files in attached you can include this line "sh blocker.sh" to your script centos5_sync.sh.
before use, please read and test this script and "configure" config file
Regards Piotr Maluty
2009/3/25 Alex Chekholko chekh@pcbi.upenn.edu:
On Wed, 25 Mar 2009 10:34:51 +0000 Karanbir Singh mail-lists@karan.org wrote:
A request to all mirror admins: please ensure that the 5.3 tree is not visible to the public over http/rsync/ftp till the release is announced.
What's the best way to do that?
My mirror is a simple script:
$ cat /home/mirror/centos5_sync.sh #!/bin/bash
date > /tmp/rsync_centos.log rsync -avH --delay-updates --delete-after --exclude '2*' --exclude '3*' --exclude '4*' --delete us-msync.centos.org::CentOS /gpfs/fs0/repos/pub/centos >> /tmp/rsync_centos.log date >> /tmp/rsync_centos.log
and then vsftpd is serving up anon_root /gpfs/fs0/repos/pub
Regards,
Alex Chekholko _______________________________________________ CentOS-mirror mailing list CentOS-mirror@centos.org http://lists.centos.org/mailman/listinfo/centos-mirror