[tex-live] Your rsync probe for mirmon

Roland Pelzer roland_pelzer at yahoo.de
Tue Aug 18 20:15:30 CEST 2009


Sorry for just sending you an email. I want to setup mirmon for our
sanesecurity mirrors which use rsync. Found your script with google and used it as probe for mirmon-1.38.

I using the script for probe:

#!/usr/bin/env perl
# $Id: probe-mirmon,v 1.3 2009/07/05 22:39:33 karl Exp $
# public domain.
# probe rsync url's for mirmon; use wget for anything else.
# from description at http://people.cs.uu.nl/henkp/mirmon.

exit (&main ());

sub main
{
  my ($timeout,$url) = @ARGV;
  my $ret;

  if ($url =~ m,^rsync://,) {
    $ret = &handle_rsync ($timeout, $url);
  } else {
    $ret = system qq(wget -q -O - -t 1 -T $timeout $url);
  }
  return $ret;
}


sub handle_rsync
{
  my ($timeout,$url) = @_;
  
  my $tmpdir = "rsync-tmp";
  -d $tmpdir || mkdir ($tmpdir, 0700);
  
  (my $file = $url) =~ s/\W/_/g;  # translate
 all non-letters to _
  my $local = "$tmpdir/$file";
  my $ret = system
             qq(/usr/local/bin/rsync --no-motd --timeout $timeout $url $local);

  @ARGV = ($local);  # don't care about our args any more.
  print <>;          # let perl autoprint

  return $ret;
}
This works very well if i start it with command line like probe-mirmon 300 rsync://odin.kozstyle.org/sanesecurity/TIMESTAMP.

I use the following (ver basic for testing) mirmon.conf

project_name SS
project_url http://www.sanesecurity.com
list_style plain
mirror_list mirror_list
web_page ss.html
icons icons
state mirmonstate
countries countries.list
probe /root/mirmon-1.38/probe-mirmon %TIMEOUT% %URL%TIMESTAMP

mirrorlist

de rsync://odin.kozstyle.org/sanesecurity/

Using mirmon -v -get all, i encounter the following error

*** strange url :
 'rsync://odin.kozstyle.org/sanesecurity/'
mirmon: wrote empty state file; keeping previous version
Use of uninitialized value in printf at ./mirmon line 909, <LST> line 2.

I
am not able to see any connection in odins rsync log! When i use the
probe-mirmon (replacing the variables) directly it will download the
TIMESTAMP

Do you have an idea? Did you got the same error?

I have double checked permissions and path names.

BR

Roland



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20090818/8d7e8890/attachment.html>


More information about the tex-live mailing list