On Mar 26, 2015, at 1:39 PM, Dale Lindskog <dale.linds...@gmail.com> wrote:
> On Thu, 26 Mar 2015, L.R. D.S. wrote: > >> Is really boring write the package repository everytime we install. >> Why not set the repository using the Time Zone as a reference? >> For example, if you set Japan as your zone, then run >> export PKG_PATH=http://www.ftp.ne.jp/OpenBSD/'uname -r'/packages/'uname -m'/ > > #!/usr/bin/perl -w > use strict; > > chomp( my( $uname_r, $uname_m ) = ( `uname -r`, `uname -m` ) ); > chomp( my $zone = join( '/', ( split('/', `ls -l /etc/localtime`) )[-2,-1] ) > ); > > my %mirror = ( > "Canada/Mountain" => "ftp://ftp.openbsd.org/pub/OpenBSD", > # okay, I'm bored now... hopefully "L.R. D.S." will help > ); > > print "$mirror{$zone}/$uname_r/packages/$uname_m/"; > Why not go whole hog and traceroute -I <everything> and see which is faster? :-P BTW: ftp5.usa.openbsd.org seems to not be responding on HTTP, so I dropped them a note. But then I found sonic has a mirror, that, though geographically further, is about 1/2 a ms faster (and two fewer hops). So, it's not just going to other countries where this happens. Sean