On Tuesday 25 Apr 2006 12:07, Christopher X. Candreva wrote:
> On Tue, 25 Apr 2006, Bob Hutchinson wrote:
> > On Monday 24 Apr 2006 22:35, Steve Basford wrote:
> >
> > using the --stdout method results in a new timestamp. For me that is
> > confounding.
>
> Yes. Unfortunately I didn't see any other way to keep the original .gz file
> intact. The LWP mirror library needs the original .gz file, as that is what
> will be compared to, to decide if an update is needed.
>
> If you know a gunzip option that will NOT delete the compresed file,
> that would be the prefered method.

<snip>
if ($result == 200) {
    # not required
    if ( -f $dbfile ) {
        system("cp -fp $dbfile $dbfile.old");
    }
    if ( -f $file) {
        system("cp -p $file $file.tmp");
        system("gunzip -Nf $file");
        system("mv $file.tmp $file");
    }
}
</snip>

the -f parameter should stop gunzip from asking you if you want it overwritten

It might be best *not* to do this directly into /usr/local/share/clamav (or 
wherever), then a check can be done to see if the update has
1) made it
2) is newer than the live one

The trouble with perl system() calls is that you don't get any result codes, I 
might experiment with backticks instead.

more later....

>
>
> ==========================================================
> Chris Candreva  -- [EMAIL PROTECTED] -- (914) 967-7816
> WestNet Internet Services of Westchester
> http://www.westnet.com/
> _______________________________________________
> http://lurker.clamav.net/list/clamav-users.html

-- 
-----------------
Bob Hutchinson
Midwales dot com
-----------------
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to