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

Re: kde mirror



On Saturday 24 February 2001 15:04, Pablo de Vicente wrote:
> El Sáb 24 Feb 2001 18:42, Dave Smith escribió:
> > I run several PCs which use KDE2. I have used apt-move to create a local
> > mirror of the main and non-us packages and wish to do the same with the
> > KDE2 packages. Does anyone have a utility (or nifty one liner) which
> > achieves this?
>
>  You may use mirror or rsync.
>
> Mirror is perl script which makes ftp to kde.tdyc.com. It needs a file with
> the rules to exclude/include directories and files. If you are interested I
> can send you the one I use.
>
> You can also use rsync, which probably, is a better solution. I use that to
> mirror debian. I think that there is an "old" message in this list with the
> rsync command you may use for kde.tdyc.com. Wait a minute I look for it:
>
>
> The command is from Achim Bohnet <ach@mpe.mpg.de>
>
> Arrrgh!  Thanks Quim!!  I always forget that I can list modules with rsync.
> Will put it into cron when 2.0.1 potato debs appear.  FWIW if someone
> else what's to use rsync only for KDE2 i386 potato debs:
>
>     cd "$tdyc_mirror_root"
>     exec rsync --dry-run -v -v -az --delete --delete-excluded \
>         --exclude source/       \
>         --exclude incoming/     \
>         --exclude changes/      \
>         --exclude qt1apps/      \
>         --exclude binary-alpha/ \
>         --exclude binary-m68k/  \
>         --exclude binary-sparc/ \
>         --exclude binary-powerpc/ \
>         kde.tdyc.com::kde/dists/potato/ .
>
> Remove --dry-run and -v's as you like :)
> Achim
>
>
> Pablo de Vicente.

I expanded on it a little because I have a dialup connection.  It's not guru 
scripting but it works.  This one is for i386 systems.  I export the mirror 
nfs so I can use it for a couple of machines.  Here's the /etc/fstab line on 
my local machines (this is supposed to be all on one line):

servername:/mirror/kde2  /mnt/kde2 nfs 
rsize=8192,wsize=8192,timeo=14,intr,hard,ro 

and their corresponding sources.list line 
deb file:/mnt/kde2 potato main crypto optional

===================================
#!/bin/bash
#/usr/sbin/mirror_kde2
 
# declare variables
tdyc_mirror_root="/mirror/kde2/dists/potato/"
connection_up=`ifconfig | grep ppp0`
 
# function to do rsync stuff
do_rsync_function ()
{
  cd $tdyc_mirror_root
  exec rsync -v -v -az --dry-run --delete --delete-excluded \
   --exclude source/ \
   --exclude incoming/ \
   --exclude changes/ \
   --exclude qt1apps/ \
   --exclude sword/ \
   --exclude binary-alpha/ \
   --exclude binary-m68k/ \
   --exclude binary-sparc/ \
   --exclude binary-powerpc/ \
   --exclude beta/ \
   kde.tdyc.com::kde/dists/potato/ .
}
 
# need a test to see if online
# then start connection as necessary
 
if [ "$connection_up" == "" ]; then
     pon bellsouth
     sleep 1m
     do_rsync_function
else
     do_rsync_function
fi
 
# remove --dry-run and -v's when satisfied.
# mail output to root?        
===================================



Reply to: