Hm - seems that I may have commented out WGET and have been using CURL even
with the new version (because of date mismatches).

So - maybe the enclosed will help.

It SEEMS as if my /rulebase/ folder has been updated at least twice since
8:30 AM this morning...

-----Original Message-----
From: Message Sniffer Community [mailto:snif...@sortmonster.com] On Behalf
Of Pete McNeil
Sent: Monday, March 09, 2009 9:45 AM
To: Message Sniffer Community
Subject: [sniffer] Daylight Savings Time Update Problem.

Hello Sniffer Folks,

IMPORTANT!

We have discovered a problem with the rulebase update mechanism that is 
currently installed on most systems; and this problem combined with 
daylight savings time is causing trouble with rulebase updates.

There has long been a bug in the getRulebase script using wget which 
causes the rulebase file that is downloaded to have the local system's 
timestamp. Under normal circumstances this does not cause a problem 
because most system clocks are synchronized and the local timestamp is 
generally newer than the timestamp of the rulebase file on our servers.

HOWEVER, with daylight savings time starting this past Sunday there is a 
problem:

The local timestamp for the rulebase file is almost always older than 
the timestamp shown on our servers. As a result the update mechanism 
continues to go back to get a new rulebase file over, and over, and over 
again.

We have a newer update script that uses CURL and we are testing this 
newer script to see if it will solve this problem even when the local 
server's daylight savings time starts later than our server. (The start 
date of daylight savings time has change recently)

We are hopeful that the new script and the use of CURL will solve the 
update problem by fixing the timestamp bug. We will let you know shortly 
about the results of our testing.

In any case, there are clearly a large number of servers that are not 
yet on daylight savings time and that in itself is likely to cause some 
problems.

We will post again shortly,

Best,

_M


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <sniffer@sortmonster.com>.
To unsubscribe, E-mail to: <sniffer-...@sortmonster.com>
To switch to the DIGEST mode, E-mail to <sniffer-dig...@sortmonster.com>
To switch to the INDEX mode, E-mail to <sniffer-in...@sortmonster.com>
Send administrative queries to  <sniffer-requ...@sortmonster.com>

REM @ECHO OFF
SETLOCAL 

REM ----- Edit This Section --------

SET SNIFFER_PATH=D:\IMail\declude\SNF
SET RULEBASE_PATH=%SNIFFER_PATH%\Rulebase
SET WORKSPACE_PATH=%SNIFFER_PATH%\Workspace
SET AUTHENTICATION=myauthcode
SET LICENSE_ID=mylicensekey

REM --------------------------------

CD /d %SNIFFER_PATH%

if not exist %WORKSPACE_PATH%\UpdateReady.txt GOTO DONE

REM The next line may cause trouble if your system stops while this
REM script is running. It is not needed when this script is run
REM from SNF's <update-script/> feature since only one copy will run
REM at a time. However, if you are going to run a version of this
REM script as a scheduled task you will want to uncomment the next
REM line to make sure only one copy runs at a time-- just be sure to
REM clean out any stale .lck files after a restart.

REM if exist %WORKSPACE_PATH%\UpdateReady.lck GOTO DONE

:DOWNLOAD
 
COPY %WORKSPACE_PATH%\UpdateReady.txt %WORKSPACE_PATH%\UpdateReady.lck

REM wget http://www.sortmonster.net/Sniffer/Updates/%LICENSE_ID%.snf -O 
%RULEBASE_PATH%\%LICENSE_ID%.new.gz --header=Accept-Encoding:gzip 
--http-user=sniffer --http-passwd=ki11sp8m
REM if exist %RULEBASE_PATH%\%LICENSE_ID%.new.gz gzip -d -f 
%RULEBASE_PATH%\%LICENSE_ID%.new.gz

curl http://www.sortmonster.net/Sniffer/Updates/%LICENSE_ID%.snf -s -R -f -o 
%RULEBASE_PATH%\%LICENSE_ID%.new -z %RULEBASE_PATH%\%LICENSE_ID%.snf 
--compressed -u sniffer:ki11sp8m -D %SNIFFER_PATH%\curlhdr.txt
if %ERRORLEVEL% NEQ 0 goto CLEANUP
if not exist %RULEBASE_PATH%\%LICENSE_ID%.new goto CLEANUP

snf2check.exe %RULEBASE_PATH%\%LICENSE_ID%.new %AUTHENTICATION%

if errorlevel 1 goto CLEANUP

if exist %RULEBASE_PATH%\%LICENSE_ID%.old del %RULEBASE_PATH%\%LICENSE_ID%.old

rename %RULEBASE_PATH%\%LICENSE_ID%.snf %LICENSE_ID%.old
rename %RULEBASE_PATH%\%LICENSE_ID%.new %LICENSE_ID%.snf

if exist %WORKSPACE_PATH%\UpdateReady.txt del %WORKSPACE_PATH%\UpdateReady.txt
if exist %WORKSPACE_PATH%\UpdateReady.lck del %WORKSPACE_PATH%\UpdateReady.lck

:CLEANUP

if exist %RULEBASE_PATH%\%LICENSE_ID%.new del %RULEBASE_PATH%\%LICENSE_ID%.new
if exist %WORKSPACE_PATH%\UpdateReady.lck del %WORKSPACE_PATH%\UpdateReady.lck 

:DONE

ENDLOCAL


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <sniffer@sortmonster.com>.
To unsubscribe, E-mail to: <sniffer-...@sortmonster.com>
To switch to the DIGEST mode, E-mail to <sniffer-dig...@sortmonster.com>
To switch to the INDEX mode, E-mail to <sniffer-in...@sortmonster.com>
Send administrative queries to  <sniffer-requ...@sortmonster.com>

Reply via email to