[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [magicmail-users] BMS Tools
I updated the script as you suggested, but had the same results. It
still exists after about 5 seconds. Here's the output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 117 100 117 0 0 815 0 --:--:-- --:--:-- --:--:-- 0
/var/cache/bms is still empty.
Thanks again!
Robert
On 7/8/06, Michael Peddemors <michael@linuxmagic.com> wrote:
> We will see about getting an updated script on the site, as soon as possible,
> but in the mean time, change the the $url, to be:
>
> $url = 'http://mirror1.bms.linuxmagic.com/bms_updates/index';
>
> And try that real quickly, sorry just stepping out for lunch, but otherwise I
> will bring this up on Monday.
>
> There are a couple of issues.. never noticed before..
> Curl may try to redirect, to a different URL if you are just using the /, and
> that is 'www.mirro..' which won't work for you anyways.. Might be a change
> at the hosting company.
>
> Try that, see if it works..
>
> You can try ..
>
> curl --connect-timeout 120 -S
> http://mirror1.bms.linuxmagic.com/bms_updates/index
>
> to test, as well..
>
> This will get you a list, and hopefully the script will then handle it
> correctly.
>
>
> On July 8, 2006 02:14 pm, Robert Sharp wrote:
> > It's the script from the LinuxMagic site. The only alterations I have
> > made were to show the output. Here is the script itself:
> >
> > #!/usr/bin/perl -w
> > #
> > # (c) LinuxMagic Inc. 2004 All Rights Reserved.
> > #
> > # $Id: update_lists.pl,v 1.5 2004/09/28 17:46:24 josh Exp $
> > #
> >
> > #
> > # CONFIG
> > #
> >
> > $incoming = '/var/cache/bms/incoming';
> > $listdir = '/var/cache/bms';
> > $url = 'http://mirror1.bms.linuxmagic.com/bms_updates/';
> > $command='/usr/bin/curl';
> >
> > #
> > # END CONFIG
> > #
> >
> > # make sure listdir and incoming end with '/'
> > if ($listdir !~ m/\/$/) {
> > $listdir .= "/";
> > }
> > if ($incoming !~ m/\/$/) {
> > $incoming .= "/";
> > }
> >
> > # Forgot to check to see if this file is there before assigning
> > # it to a variable below..
> > # Might want to make this handler better
> > #
> > if ( ! -x $command ) {
> > print STDERR "FATAL: Missing executable, [$command]\n";
> > exit (1);
> > }
> >
> > if (( ! -d $listdir ) || ( ! -d $incoming )) {
> > print STDERR "FATAL: Unable to update block lists, output dir does
> > not exist.\n";
> > exit (1);
> > }
> >
> > $filelist=`curl --connect-timeout 120 -S $url`;
> >
> > my @files;
> > while ($filelist =~ s/^.*?href=\"([^\"]*)\"//s) {
> > $file = $1;
> > chomp($file);
> > if ((length($file) > 0) && ($file =~ m/.bz2$/)) {
> > push (@files, $file);
> > }
> > }
> >
> > foreach $file (@files) {
> > @oldstatinfo = stat("$incoming$file");
> > system("$command -sS --connect-timeout 120 -S --time-cond
> > $incoming$file -o $incoming$file $url$file");
> > @newstatinfo = stat("$incoming$file");
> >
> > # see if size (7) or mtime (9) have changed
> > if (@newstatinfo) {
> > if (!@oldstatinfo
> >
> > || ($oldstatinfo[7] != $newstatinfo[7])
> > || ($oldstatinfo[9] != $newstatinfo[9])) {
> >
> > $outfile = $file;
> > $outfile =~ s/\.bz2$//;
> >
> > system("bunzip2 -k $incoming$file && mv $incoming$outfile
> > $listdir$outfile");
> > print "Updated list $outfile\n";
> > }
> > }
> > }
> >
> > I also increased the timeout value.
> >
> > Thank you for all help!
> > Robert
> >
> > On 7/8/06, Michael Peddemors <michael@linuxmagic.com> wrote:
> > > Can you examine the script, and see which file it is attempting to
> > > retrieve?
> > >
> > > The file name is 'index', and you see to just be trying to retrieve
> > > /updates/blocklists/
> > >
> > > Your last attempt was ..
> > >
> > > 07/Jul/2006:03:28:39
> > >
> > > On July 7, 2006 03:28 pm, Robert Sharp wrote:
> > > > 70.251.166.3
> > >
> > > --
> > > "Catch the Magic of Linux..."
> > > --------------------------------------------------------
> > > Michael Peddemors - Senior Systems Developer
> > > LinuxAdministration - Internet Services
> > > NetworkServices - Programming - Security
> > > Wizard IT Services http://www.wizard.ca
> > > Linux Support Specialist - http://www.linuxmagic.com
> > > LinuxMagic is a Registered TradeMark of Wizard Tower TechnoServices Ltd.
> > > --------------------------------------------------------
> > > (604)589-0037 Beautiful British Columbia, Canada
> > >
> > > This email and any files transmitted with it are confidential and
> > > intended solely for the use of the individual or entity to which they
> > > are addressed. If you have received this email in error please notify
> > > the system manager. Please note that any views or opinions presented in
> > > this email are solely those of the author and do not necessarily
> > > represent those of the company.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: magicmail-users-unsubscribe@linuxmagic.com
> > > For additional commands, e-mail: magicmail-users-help@linuxmagic.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: magicmail-users-unsubscribe@linuxmagic.com
> > For additional commands, e-mail: magicmail-users-help@linuxmagic.com
>
> --
> "Catch the Magic of Linux..."
> --------------------------------------------------------
> Michael Peddemors - Senior Systems Developer
> LinuxAdministration - Internet Services
> NetworkServices - Programming - Security
> Wizard IT Services http://www.wizard.ca
> Linux Support Specialist - http://www.linuxmagic.com
> LinuxMagic is a Registered TradeMark of Wizard Tower TechnoServices Ltd.
> --------------------------------------------------------
> (604)589-0037 Beautiful British Columbia, Canada
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to which they
> are addressed. If you have received this email in error please notify
> the system manager. Please note that any views or opinions presented in
> this email are solely those of the author and do not necessarily
> represent those of the company.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: magicmail-users-unsubscribe@linuxmagic.com
> For additional commands, e-mail: magicmail-users-help@linuxmagic.com
>
>