From owner-freebsd-questions@FreeBSD.ORG Wed Feb 4 16:38:50 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B52F1065722 for ; Wed, 4 Feb 2009 16:38:50 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 23D3B8FC23 for ; Wed, 4 Feb 2009 16:38:49 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [69.69.69.183] ([69.70.93.206]) by VL-MO-MR005.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KEJ006VCVIWADQ0@VL-MO-MR005.ip.videotron.ca> for freebsd-questions@freebsd.org; Wed, 04 Feb 2009 11:37:44 -0500 (EST) Message-id: <4989C522.1040603@optiksecurite.com> Date: Wed, 04 Feb 2009 11:41:06 -0500 From: FreeBSD User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) To: "freebsd-questions@freebsd.org" Subject: Strange fetch behaviour X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 16:38:51 -0000 Hi everyone, I'm totally mystified by this one: I have a shell script that fetch a couple of RSS feeds periodically. It worked fine. I now want to integrate a 3 times retry if the fetch fails. The logic of the script if now good but when I'm testing the script by unplugging the network cable to confirm that the script is retrying I can see that fetch always succeed to download, even with the cable unplugged! There is the output received by email from cron: fetch: http://www.cyberpresse.ca/rss/225.xml: No address record Let's wait...actualites.xml 0 fetch: http://www.cyberpresse.ca/rss/225.xml: No address record Let's wait...actualites.xml 1 fetch: http://www.cyberpresse.ca/rss/225.xml: No address record Let's wait...actualites.xml 2 Let's continue... /usr/local/www/canadien.xml 10 kB 479 kBps /usr/local/www/insolite.xml 9329 B 448 kBps ... But the cable is still unplugged! Every feed comes from the same source (cyberpresse.ca) At the beginning, my script used ftp instead of fetch, but I got the same result. I'm using a simple 'fetch -o actualites.xml http://www.cyberpresse.ca/rss/225.xml' command that take the output file and the source file from a variable. I could paste the code but there's part of it in French so I'll just start with this. I'm wondering if there is any sort of caching or verification that if the output file is already there not to download again? I know it's silly but I'm totally confused... Thanks for your help. Martin