Per the request, here is a first draft of some scripts to automate 
checking the mirrors and making sure they still work.  I'll hack up 
some to download the TIMESTAMP file from all the rsync mirrors soon.

These work for me in zsh; any portability or other corrections greatly 
appreciated.

function pingdistfiles() {
     for foo in $(tail -n '+2' /sw/lib/fink/mirror/master | cut -d '/' 
-f 3); do echo $(ping -c 5 $foo | gawk '/packet loss/{print $7}') " " 
$foo; done | grep -v '^0%' | tee distfiles_check_`date '+%s'`

}
#The output of this function lists the distfiles mirrors that have 
failed the last three checks.
function threebad() {
     comm -1 -2 $(ls distfiles_check_* | head -n 2) | comm -1 -2 $(ls 
distfiles_check_* | tail -n 1) - | cut -d ' ' -f 4
}

function rmoldest() {
        rm $(ls distfiles_check_* | head -n 1)
}

Just install these into cron at some reasonable interval (put rmoldest 
after each run of pingdistfiles) (making sure you run pingdistfiles 
three times to start, so rmoldest won't delete too many), and pipe 
threebad into a mail to the maintainer, or a script to edit the files 
automatically, and mail the maintainer.

Jesse Weinstein


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to